query SQL how to check all records from a three table join share the same value
- by Stefano
Hello
Since i'm a poor sql developer, i need support to write a sql query for the following scenario (just a simplified example of my situation):
i've got 3 tables, say employe table,department table and companybranch table.
the dept column , on the employe table is a fk on the department table; the branch column on the department table is a fk on the companybranch table.
Finally more employee are "marked" with the same value .
There's a way to select all employes with the same "mark" and, in the same query, check that they work in the same company branch ?
thank you in advance
Stefano