By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
version() |
---|
10.3.31-MariaDB |
foo | user_id_1 | user_id_2 |
---|---|---|
42 | 53 | 687 |
42 | 687 | 53 |
40 | 53 | 9832 |
40 | 9832 | 53 |
49 | 53 | 12 |
39 | 53 | 9832 |
39 | 9832 | 53 |
foo | user_id_1 | user_id_2 | position |
---|---|---|---|
49 | 53 | 12 | 0 |
42 | 53 | 687 | 1 |
40 | 53 | 9832 | 2 |
39 | 53 | 9832 | 3 |
42 | 687 | 53 | 1 |
40 | 9832 | 53 | 1 |
39 | 9832 | 53 | 2 |