Amazon Interview Question

SQL: create table, join, group by, order by, rank.