TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sasi Rekha
NA
507
94.9k
Get halfyearly data from monthly data
May 24 2018 2:54 AM
How to get halfyearly data from monthly data
the structure isl ike below
I am having monthwise data i should convert it into halfyeardata with sum values''
Please tell me if anyone knows
DS100 2018-01-01 100
DS101 2018-02-01 100
DS100 2018-07-01 100
DS100 2018-02-01 100
I need like below result
DS100 Halfyear1 200 2018
DS100 Halfyear2 100 2018
DS101 Halfyear1 100 2018
Hi ,
i got answer myselg,please have a look
select DSID,Sum(IntValue),(datepart(mm,MONTH)-1)/6+1 as [halfyearly],datepart(yy,MONTH) as [year] from MonthlyData group by DSID,datepart(yy,MONTH),(datepart(mm,MONTH)-1)/6+1
Reply
Answers (
6
)
how to display department name along with number of employe
Table data lost? How to get back it?