I cant figure out one sql query. I need to get data from table, that are not paired in another table. So my limited knowlage is not enought here.
Lets say we have 3 tables client - category - client_category
TABLE CLIENT
| id | name |
|---|---|
| 1 | client 1 |
| 2 | client 2 |
TABLE category
| id | name |
|---|---|
| 1 | category 1 |
| 2 | category 2 |
| 3 | category 3 |
TABLE client_category
| id | id_client | id_category |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 2 | 2 |
| 3 | 2 | 3 |
DESIRED OUTPUT
| client | category |
|---|---|
| client 1 | category 2 |
| client 1 | category 3 |
This also need to work with more clients and categories.