On the Subject of SQL - Not-So-Cruel
The table reveals its true face.
For those who are familiar with the original manual (yes, this is almost mandatory this time).
Author's note:
This lookup table works best when there are only 2 rows in the desired output (AND ONLY AROUND 2/3 OF THE TIME). I suspect that the module only generates 3x2 tables, although the original manual states the module can generate any row/column number in 1-3 range. In case I am wrong keep in mind that if only 1 row generates, it is probably easy enough to do the module normally. In case if 3 rows generate, you can just solve for any 2 rows and double check that the other 2 pairs of rows work (I didn't put the triple groups of numbers because of lack of space, sorry). ALSO, if you can't find the solution in the ~1/3 of the cases, that means a complicated WHERE clause has to be used (and you have to solve the module normally, whoops).
How the table works (on pages 2+):
Disclaimer: The following wording might be ambiguous but if you know how the module works, you will get what this means. For each GROUP BY (assuming no complicated WHERE clauses are used) each letter-function pair outputs 3 values (since there are 3 groups) called a, b, c (associated with rows 1,2,3 of the resulting table); the table shows 3 pairs of value in a form a-b, b-c, a-c. Since the module only wants 2 rows, use LIMIT, SKIP AND WHERE to get rid of the odd one out row accordingly (if you use LIMIT/SKIP to get rid of row 1/3, use A>0, if you want to get rid of the middle row, use WHERE X not equal to "second digit of the X'th dataset column (as in 2nd out of the 3 occurring)" where X is from GROUP BY X).
| A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|
| 9 | 5 | 0 | 2 | 1 | 0 | 3 |
| 7 | 8 | 3 | 1 | 0 | 6 | 4 |
| 7 | 5 | 7 | 4 | 6 | 5 | 3 |
| 9 | 8 | 0 | 4 | 1 | 0 | 4 |
| 1 | 2 | 7 | 2 | 6 | 6 | 3 |
| 1 | 8 | 3 | 1 | 6 | 0 | 5 |
| 9 | 2 | 7 | 2 | 1 | 5 | 5 |
| 1 | 5 | 7 | 2 | 6 | 6 | 4 |
| 7 | 8 | 0 | 4 | 0 | 0 | 4 |
| 9 | 2 | 0 | 1 | 1 | 5 | 5 |