Hi there, Is there any solution for my stuff..
sam 10 2002-01-01 ram 10 2002-01-01 sham 20 2002-01-01
sam 10 2002-01-02 ram 10 2002-01-02 sham 20 2002-01-02 sam 10 2002-01-03 ram 10 2002-01-03 sham 20 2002-01-03
week1,Jan
sam 30
II'ly I have to show for remaining weeks of the month.. Any Help regarding this would be great.
Thanks, Unmendu
Try something like this:
select date_format(Date, '%b') as 'Month', ceiling(date_format(Date, '%e') / 7) as 'Week', user, sum(HrWorked) from myTable group by date_format(Date, '%b'), ceiling(date_format(Date, '%e') / 7) , user