QAD interview question

sql joins