Reputation: 69
I have to fetch records for particular month as Count and date as two separate columns in which for last 5 days It should be group by date wise,And for the remaining days the count should be as 6th day Count as shown below, enter image description here
Upvotes: 1
Views: 71
Reputation: 435
Use 2 queries: 1st query: (fetch for 5 days using group by) union 2nd query: (fetch rest of data using case statement).
Upvotes: 1