added sql queries 7-9