I need to find a way to find what conversions are missing.
I have three tables.
Table 1
: type
, which are the different types
.
id | name |
---|---|
1 | typeA |
2 | typeB |
3 | typeC |
Table 2
: section
, which are the different sections
.
id | name |
---|---|
1 | section1 |
2 | section2 |
3 | section3 |
4 | section4 |
Table 3
: conversions
, which contains all the combinations to go from one type
to another for each of the sections
.
id | section_id | type_convert_from | type_convert_to |
---|---|---|---|
1 | 1 | 1 | 2 |
2 | 2 | 1 | 2 |
3 | 3 | 1 | 2 |
4 | 4 | 1 | 2 |
5 | 1 | 1 | 3 |
6 | 2 | 1 | 3 |
7 | 3 | 1 | 3 |
8 | 4 | 1 | 3 |
9 | 1 | 2 | 1 |
10 | 2 | 2 | 1 |
11 | 3 | 2 | 1 |
12 | 4 | 2 | 1 |
For example some are missing from the table above, how can I identify them with a SQL query? Thanks!