Querying table based on a field of a related table - Drizzle Team