Using .only clause in queries