Prodinf Software interview question

Data structures and algorithms, SQL queries on multiple tables