NRoot Labs interview question

Questions related to SQL .