select queries with one query