Hi
I'm having problems with a union and group by... My query looks like this...
(select count(*) as numberOfC,Customer.country,Customer.creationdate FROM Customer,VIP where Customer.id=VIP.customer and VIP.brand=2 and Customer.creationdate > '1999-31-01' group by country)
union
(select count(*) as numberOfC,Customer.country,Customer.creationdate FROM Customer,Catalog where Customer.id=Catalog.customer and Catalog.brand=2 and Customer.creationdate > '1999-31-01' group by country)
order by numberOfC desc;
My problem is, that the two gruop by's each give me one "numberOfC". Can I just add those? My goal is to get the destinct number of cutomers in each country...
regars jesper