queries - wrapper of the psycopg2 library