Hi ALL
THere is a data table from a flower shop which looks like
CustomerID Flower
John peony
John lily
John Lotus
Mary peony
Mary lily
Mary chrysanthemum
Lisa chrysanthemum
Lisa peony
Lisa kapok
enter code here
I would like to find those customers' ID who buy the same n flowers. For example, in the above table, for peony and lily , the customers who buy both of them (n=2, for this case) are John and Mary.
I cannot figure out a SQL statement to do the above query. Please help. Thanks