if statement on sql query

Printable View