TiCon System Interview Question

Asked me to write sql query based on a given scenario