X by 2 Interview Question

How would you implement sql?