Allanasons interview question

Last year project and SQL queries