Litmus7 interview question

SQL Queries about filter, foreign and primary key, sorting