Added db query features
Did some work
sql queries added
Merged queries
Merged master and aug24