Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL server : How to group by the data by monday to sunday as a week ?

 
ravi sahil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SQL server : How to group by the data by monday to sunday as a week ?

lets take one example :

take month march 2013, if i use the week function then it will group by week 1 (3 days data) week 2 (5 days data) week 3 (5 days data) week 4 (5 days data)

and i need the week always should be start from Monday to Sunday not from any day of week.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49411
62
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
You appear to have posted in an inappropriate location, but never fear, I shall try moving the question where it is more likely to be answered.
 
ravi sahil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ravi sahil wrote:SQL server : How to group by the data by monday to sunday as a week ?

lets take one example :

take month march 2013, if i use the week function then it will group by week 1 (3 days data) week 2 (5 days data) week 3 (5 days data) week 4 (5 days data)

and i need the week always should be start from Monday to Sunday not from any day of week.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic