6D Technologies Interview Question

Asked to write sql query over a table