40. Methods of Conditional Replacement

This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.

Interesting SQL Exercise. Given the following Colors table:

(cid int identity(1,1),
cdesc varchar(25))

As seen in the table, the white colors appear under an even serial number, while the black colors appear under an odd serial number.

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…