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 Reddy
NA
346
225.8k
Aggregate function query
Oct 13 2014 10:02 AM
SELECT
COUNT(DISTINCT(CONVERT(VARCHAR(10), Logintime, 101)))
AS COUNT
FROM
UserLoginStatus where UserId=15
HAVING DATEDIFF(MINUTE,MIN(Logintime),MAX(Logouttime))< 480
above i need to fetch Month(Logintime) in where condition .
if i keep in query it is showing empty otherwise it is showing count as 2
how to do that one
Reply
Answers (
3
)
SQL Server
howcan insert record Mon to Sata and Sun wll nt insert recod