K-Rise Systems interview question

Mainly focused on sql cases