6D Technologies interview question

Asked to write sql query over a table