Jama Software interview question

Do a complicated SQL query!