Bitwise Interview Question

Sql joins