How to do this in SQL???

Printable View