attempts at queries

having some problems