By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
5 rows affected
ERROR: new row for relation "route" violates check constraint "routes_orig_dest_distinct_ck"
DETAIL: Failing row contains (6, Z, Z).
| route_id | origin | destination |
|---|---|---|
| 1 | A | B |
| 2 | C | D |
| 3 | B | A |
| 4 | C | A |
| 5 | D | C |
| point_1 | point_2 | count |
|---|---|---|
| A | B | 2 |
| A | C | 1 |
| C | D | 2 |
| point_1 | point_2 | count |
|---|---|---|
| A | B | 2 |
| A | C | 1 |
| C | D | 2 |