Bitwise Interview Question

SQL queries