SQL select only if all many to many are found

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


SQL select only if all many to many are found



We have 3 tables:



1: jobs with a single column name


jobs


name



2: workers with a single column name


workers


name



3: jobs_workers lookup table with job_id and worker_id columns.


jobs_workers


job_id


worker_id



Now I got an array of job IDs looking like: [1,2,3] how do I select only workers that are doing ALL 3 jobs?


[1,2,3]









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

CRM reporting Extension - SSRS instance is blank

Keycloak server returning user_not_found error when user is already imported with LDAP