Tectoro interview question

given table and asked to write queries