SQL Queries updated and some other minor changes
SQL Queried