© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
3 replies
Fyzz

Query a table based on related table

How do I go about querying a table of let’s say visits that each have a date and have a relation to a table called jobs where one job could have many visits, how would I go about getting visits based on a date range that only belong to a job with a given “company id”

I know how to get them in the date range but I’m not sure how to go about having a date range and() related jobs company Id without also storing the company id in each visit
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Querying table based on a field of a related table
Drizzle TeamDTDrizzle Team / help
3y ago
How to filter query based on children table?
Drizzle TeamDTDrizzle Team / help
3y ago
With Query mode, is possible filter by a related table?
Drizzle TeamDTDrizzle Team / help
16mo ago
query based on deep relations
Drizzle TeamDTDrizzle Team / help
2y ago