Sagility interview question

sql questions (basic to medium)