splitting query test so it's clear what is working and what not.
query works as long as you're not joining tables