Finished SQL half of the Query methods