Querying based on record in another table - Drizzle Team