Hi Guys,
Can some one give me a query which will give me the below mentioned results.
i have a table with 3 columns
id,actor,patient
where actor and patient are of same type, i,e a particular value can be actor in one row and can be a patient in another row
my data :
1,A,B
2,C,D
3,B,C
4,D,E
5,B,F
now i want to get count of each actor or patient appearing in total number of rows and sort then by count i,e
output:
B,3
C,2
D,2
E,1
F,1
i,e B appears in 3 rows, C in 2 Rows and so on ....
Thanks in Advance,
Danny ...