|
|
|
|
|
by weaksauce
1754 days ago
|
|
I'm not sure if you are replying to the wrong person but the question has nothing to do with a total sum of ids... the question was: "List all pairs of customer IDs who live on a street with the same name but in a different city." listed under self-join that said i haven't wrangled with raw sql in a spell so the reading on window functions is interesting. |
|
That said, I have a feeling your duplicates can be fixed by adding the requirement that c.cid < c2.cid
Not sure a window function would help in this particular situation, but they are there to help in more mundane examples.