Hi!
Recently I came across with the following quiz. Imagine we have this table
+--------+
| colors |
+--------+
| red |
| black |
| white |
| green |
| orange |
+--------+
The task is to write a SQL query that will select all pairs without allowing duplicates. Permutations are counted too ({red, black} = {black, red}, hence only one of the pair is allowed).