Jama Software Interview Question

Do a complicated SQL query!