Agilysys interview question

Asked me to write code logic and SQL queries