Realtor.com Interview Question

Write a sql query