Re: [SQL] Removing redundant itemsets

2008-03-31 Thread Allan Kamau
Craig, Thank you so much for the solution. I have spent many hours since Thursday last week including the weekend (and it took you just a few minutes) trying to figure out a solution not involving procedural programming and looping (as the size of the items and even the number of "purchases" i

Re: [SQL] Removing redundant itemsets

2008-03-31 Thread Craig Ringer
> -- Find any `a' for which `item_from_a_is_in_b' is > -- true for all items in `a' > SELECT a_tid AS is_redundant, b_tid AS contained_by > FROM ( > -- For every item in every pair of purchases, > -- determine whether the item in purchase `a' > -- was also in purchase `b'. > SELECT > a.

Re: [SQL] Removing redundant itemsets

2008-03-31 Thread Craig Ringer
Craig Ringer wrote: > Allan Kamau wrote: >> Hi all, >> I have a list of purchases (market basket) and I would like to select >> non redundant longest possible patterns by eliminating >> (creating/populating other table to contain only non redandant itemsets) >> purchases having item lists which are

Re: [SQL] Removing redundant itemsets

2008-03-31 Thread Craig Ringer
Allan Kamau wrote: > Hi all, > I have a list of purchases (market basket) and I would like to select > non redundant longest possible patterns by eliminating > (creating/populating other table to contain only non redandant itemsets) > purchases having item lists which are fully included in at least

[SQL] Removing redundant itemsets

2008-03-31 Thread Allan Kamau
Hi all, I have a list of purchases (market basket) and I would like to select non redundant longest possible patterns by eliminating (creating/populating other table to contain only non redandant itemsets) purchases having item lists which are fully included in at least one other purchase. (Am as