Accenture interview question

write a mysql query