Hi
I have following two tables:
tbl_customers
id customer_name customer_email
------ ------------- ------------------
1 Name1 email@hotmail.com
2 Name2 email2@hotmail.com
3 Name3 email3@hotmail.com
And tbl_customer_category_clicks
id category_id customer_id clicks
------ ----------- ----------- ------
3 22 2 4
4 23 2 22
5 19 2 1
6 12 2 6
8 5 1 10
9 20 1 20
What i want?
I want to list all the customer from tbl_customer with category_id having maximum no of clicks.
For example, output should be:
category_id customer_id clicks
----------- ----------- ------
20 1 20
23 2 22
0 3 0
Thanks