Update db.py

Fixing just one typo ("query's" to "queries"), after staring at it on my screen for the last few hours :)