074alaina157bodenschatz066
New Member
I have tbl_sActivity that looks like this:\[quote\] act_id | Client_id | act_status | user_id | act_date
1 | 7 | warm | 1 | 19/7/12
2 | 7 | dealed | 1 | 30/7/12
3 | 8 | hot | 1 | 6/8/12
4 | 5 | cold | 22 | 7/8/12
5 | 6 | cold | 1 | 16/7/12
6 | 6 | warm | 1 | 18/7/12
7 | 6 | dealed | 1 | 7/8/12
\[/quote\]I want to count act_status of each user_id's clients from their latest status. The output should come out like this\[quote\] user_id | act_status | Count(act_status)
1 | dealed | 2
1 | hot | 1
22 | cold | 1
\[/quote\]but what i can do was only to display their latest activity with no feature. So please kindly help me. Thank you very much.
1 | 7 | warm | 1 | 19/7/12
2 | 7 | dealed | 1 | 30/7/12
3 | 8 | hot | 1 | 6/8/12
4 | 5 | cold | 22 | 7/8/12
5 | 6 | cold | 1 | 16/7/12
6 | 6 | warm | 1 | 18/7/12
7 | 6 | dealed | 1 | 7/8/12
\[/quote\]I want to count act_status of each user_id's clients from their latest status. The output should come out like this\[quote\] user_id | act_status | Count(act_status)
1 | dealed | 2
1 | hot | 1
22 | cold | 1
\[/quote\]but what i can do was only to display their latest activity with no feature. So please kindly help me. Thank you very much.