i have one table consists 3 fields empid,sal,date.
emp:
empid
sal
date
in this table ids are repeated means empid 1 3times and 2 4times and 3 6times
empid 1 2 3 1 2 3
sal 10000 2000 1200 2000 3000 2098
date 2012-1 2012-1 2012-1 2012-2 2012-2 2012-2
like the above table the data in the table.
Now i want to retrieve no of empid as eno,empid, sum of sal for each empid and dates
like the below table
empid eno sal dates
1 2 12000 2 months
2 2 5000 2 months
3 2 3298 2 months
k.m.j.kiran