Līmenis 9.3 SQL uzdevumu krājums
Dotas tabulas:
| id | name |
|---|---|
| 1 | John |
| 2 | Max |
| 3 | Erick |
| id | user_id_1 | user_id_2 | connection_strength |
|---|---|---|---|
| 1 | 1 | 2 | 1 |
| 2 | 2 | 3 | 2 |
| 3 | 1 | 3 | 3 |
| 4 | 1 | 2 | 1 |
| 5 | 1 | 2 | 1 |
| 6 | 3 | 1 | 2 |
| 7 | 1 | 2 | 1 |
| 8 | 2 | 1 | 3 |
Atrisiniet tiem šādus uzdevumus:
Atrodiet lietotāju tripleti (A, B, C), kur A ir savienots ar B, B ir savienots ar C, bet A un C nav tieši savienoti.