Allscripts interview question

sql question