Good day to you all,
I am looking for help in a query. Please help me write the SQL statement. Let's say I have a table with records like this:
Autonumber Customer Product
##### James Keyboard
##### James Monitor
##### James Keyboard
and I need to show for every customer the product he has selected most often (in this case, keyboard). I can't use the MAX function for "product" because it would show the product being MAX from ASKII point of view (like, "monitor" coz it starts with an M) , NOT the maximum number of instances.
Also, is there a way to concatenate entries, so that if there are 2 results (lets say a customer has bought 2 keyboards and 2 monitors) it is still displayed as one like
##### James Keyboard+Monitor
THank you in advance!
P.S. BTW, I DO know that my example table should be distributed into many tables. I just use an example because the actual table i m trying to perforn query on is just too complicated to explain
I am looking for help in a query. Please help me write the SQL statement. Let's say I have a table with records like this:
Autonumber Customer Product
##### James Keyboard
##### James Monitor
##### James Keyboard
and I need to show for every customer the product he has selected most often (in this case, keyboard). I can't use the MAX function for "product" because it would show the product being MAX from ASKII point of view (like, "monitor" coz it starts with an M) , NOT the maximum number of instances.
Also, is there a way to concatenate entries, so that if there are 2 results (lets say a customer has bought 2 keyboards and 2 monitors) it is still displayed as one like
##### James Keyboard+Monitor
THank you in advance!
P.S. BTW, I DO know that my example table should be distributed into many tables. I just use an example because the actual table i m trying to perforn query on is just too complicated to explain
