TiCon System interview question

Asked me to write sql query based on a given scenario