Hi all,
I have a SQL query question which I am trying (so far in vein) to figure
out.
What I need to do is:
1. Determine the different products a certain customer has
2. Count how many of each product
3. Then determine which is the pre* product (i.e. has the highest
count for this product.)
there are only 8 products available.
Sample data:
Cust_no Prod_type
12345 A
12345 B
12345
12345 B
12354 B
12354 B
12354 C
I want to do this as a batch on the server. I think I can do it from a
client app, but I would involve 8 select count queries for each customer
(were talking millions of records.......)
If there is a way to do this, I would really appreciate some pointers.
TIA
Kurt