By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 6 Duplicates: 0 Warnings: 0
| id | name | profession | region | rating |
|---|---|---|---|---|
| 1 | git | front-end developer | москва | 10 |
| 2 | git | дизайнер | москва | 3 |
| 3 | git | backend developer | москва | 12 |
| 4 | git | backend developer | новосибирск | 7 |
| 5 | MySql | backend developer | новосибирск | 7 |
| 6 | MySql | аналитик | новосибирск | 5 |
Records: 14 Duplicates: 0 Warnings: 0
| id | keywordId | salary | freq |
|---|---|---|---|
| 1 | 1 | 100000 | 3 |
| 2 | 1 | 150000 | 2 |
| 3 | 1 | 200000 | 1 |
| 4 | 2 | 100000 | 5 |
| 5 | 2 | 130000 | 3 |
| 6 | 2 | 150000 | 7 |
| 7 | 3 | 100000 | 1 |
| 8 | 3 | 150000 | 7 |
| 9 | 3 | 170000 | 4 |
| 10 | 4 | 100000 | 5 |
| 11 | 4 | 125000 | 5 |
| 12 | 4 | 150000 | 2 |
| 13 | 5 | 100000 | 8 |
| 14 | 5 | 150000 | 1 |
| name | SUM(rating) |
|---|---|
| git | 19 |
| MySql | 7 |
| MIN(salaries.id) | MIN(salaries.keywordId) | salary | SUM(salaries.freq) |
|---|---|---|---|
| 7 | 3 | 100000 | 6 |
| 8 | 3 | 150000 | 9 |
| 9 | 3 | 170000 | 4 |
| 11 | 4 | 125000 | 5 |
| id | name | profession | region | rating | id | keywordId | salary | freq |
|---|---|---|---|---|---|---|---|---|
| 3 | git | backend developer | москва | 12 | 7 | 3 | 100000 | 1 |
| 4 | git | backend developer | новосибирск | 7 | 10 | 4 | 100000 | 5 |
| 4 | git | backend developer | новосибирск | 7 | 11 | 4 | 125000 | 5 |
| 3 | git | backend developer | москва | 12 | 8 | 3 | 150000 | 7 |
| 4 | git | backend developer | новосибирск | 7 | 12 | 4 | 150000 | 2 |
| 3 | git | backend developer | москва | 12 | 9 | 3 | 170000 | 4 |