ZS Associates interview question

Basic to medium SQL questions