finished assignment2 problem 1: sql queries