Bitwise Interview Question

Mostly related to sql