I have a query returning 24 records for users with code A and 54 records for users with code B
and sometimes it will return Users with code C, D….etc there can be a total of 15 different Codes.
I want my query to only display the codes once, instead of returning retpeat users.
If i do something like
Select Count(user_code) from tbl_test and group by user_code
I will only get 54 and 24
if i do something like
Select Count(user_code) as number, user_code from tbl_test and group by user_code
I will get 54 B
24 A
I only want to return
B
A
is there any way i can do that or should i just use my second query?
I may well have misunderstood big time here, but is this what you’re after?
which is the same as: