var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to do this query
THere is a data table from a flower shop which looks like
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.
if the column CustomerID and Flower is unique you could always use
WHERE Flower IN ('peony','lily')
GROUP BY CustomerID
HAVING Count(*) = 2