Added a database query