part 9 SQL solution