Providence interview question

one simple sql query and a coding question