Run query to database query q globals