Group By Problem
am 08.02.2011 12:01:39 von Adarsh Sharma--------------000900030208090400040904
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Dear all,
I stuck around one more simple problem today.
I have a table named *event_loc* having below data : ( It has many
columns but I show you main columns that I needed )
_*Tables Data :-*_
*source_id event_text*
1233 meet
1233 meet
1345 ends
1345 ends
1111 performs
13456 Minister
1233 Argentina
1233 meet
1345 ends
1555 is
As described above there are more than 100000 rows and I want my output as :
_*Output Needed :-*_
*source_id event_text Count*
1233 meet 3
1233 Argentina 1
1345 ends 3
1111 performs 1
13456 Minister 1
I tried the below query :
*select source_id ,event_text,count(*) from event_loc group by
source_id,obj_text ;*
But displays only unique record_id rows but I want as mentioned output.
Failed to achieve the mentioned output.
Thanks & Regards
Adarsh Sharma
--------------000900030208090400040904--