Amazon interview question

write sql query to extract data from a table