CellarStone interview question

basic sql queries