ifusionIT Interview Question

write and SQL query