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
krunal pande
NA
101
28k
display FinalResult column 2 times with different name and
Nov 21 2017 1:28 AM
Hi team,
i have one table with field .
empcode varchar(100),
FinalResult varchar(100),
date datetime
i want result like
display FinalResult column 2 times with different name and different where condition in single select statement
I used below query it gives present count right but wrong absent day count
select empcode,count(finalresult),(select count(finalresult) from elcm_mahsqa.tna.rostering where date between '2016-06-01' and '2016-06-15' and finalresult='a' ) as 'fg' from elcm_mahsqa.tna.rostering where date between '2016-06-01' and '2016-06-15' and finalresult='p' group by empcode.
please suggest any solution.
Reply
Answers (
2
)
Subtract Qty from 2 tables in Sql
sql server login problem