Running the first database query