I have a table with about 1000 rows like this:
I want to identify values of ID that have the IDENTICAL values of x0 to x9 in the same order.
In the table above, ID 1 and ID 3 meet this condition.
I do this by using a query that uses 2 copies of the table, joined in all 10 'x' fields. So far, so good!
For my own learning of SQL, I want to do the same thing using a NORMALIZED version of table, like this:
I'm sure this is very straightforward, but I'm not getting the SQL to work. Using the normalized table, how do I find ID values that have the same set of 10 x values in the same order.
Thanks in advance for helping this newbie!
Code:
ID x0 x1 x2 x3 x4 ... x9
1 34 75 19 9 67 10
2 21 44 79 86 8 22
3 34 75 19 9 67 10
4 ETC...
I want to identify values of ID that have the IDENTICAL values of x0 to x9 in the same order.
In the table above, ID 1 and ID 3 meet this condition.
I do this by using a query that uses 2 copies of the table, joined in all 10 'x' fields. So far, so good!
For my own learning of SQL, I want to do the same thing using a NORMALIZED version of table, like this:
Code:
ID Col X
1 0 34
1 1 75
1 2 19
...
2 0 21
2 1 44
ETC...
I'm sure this is very straightforward, but I'm not getting the SQL to work. Using the normalized table, how do I find ID values that have the same set of 10 x values in the same order.
Thanks in advance for helping this newbie!