Both query are not similar query.
Note: You have an error on your transcription the value of filter is ’10’ not ’19’.
Query 1: works join the tables strategy and customgroup by groupid, so in this grup do you have all records from the result (ids:67,68,71,73,74,76,77), in the second join you create a subgroup of b (but is a new different “table”) only with values groupid=10, so this section dont add any new record to the result, and your coundition no affect the previos join , beacuase work only for table “c”.
Query 2: in this case the filter work on all results, and this is wy the result are not the same.
You can replicate with this values.
| id | groupid |
|---|---|
| 67 | 10 |
| 68 | 10 |
| 71 | 11 |
| 73 | 11 |
| 74 | 11 |
| 76 | 10 |
| 77 | 10 |
| customerid | groupid |
|---|---|
| 3 | 11 |
| 3 | 10 |
1
solved Are the following two SQL query statements equivalent? [closed]