query the database, baby