Groupon Interview Question

Few SQL and some design approach