In my case I want to match on different combinations of a set of attributes.I have a set of 10 attributes, and I want to match each record with another on all 10, if no match then on 9 attributes, if no match then match on 8 and so on until 3. If I do a self join and try to write equal to and not equal to for each attribute then its getting too complex. Is there any simple way that anybody can suggest please!
I looked at the rollup function, it does all the combinations and thats what I want but I dont want to sum anything here, I want to find exact matches between records .
I t's not clear waht you want, at least for me.
Are you talking about a single table?
Can you please elaborate on your tables, data and rules?
Btw, you don't need to do an aggregation when you use GROUP BY :-)