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
Jhon ABhu
NA
57
4.8k
SQL Query for display single records from two records
Feb 1 2021 11:12 PM
my table consists data after research my query looks like this
Select
*
From
TableName
join
(
select
event,
Max
(Date_Time)
as
maxDate
FROM
TableName
group
by
Event)
as
t2
on
TableName.Event = t2.event
and
TableName.Date_Time = t2.maxDate
UNION
Select
*
From
TableName
join
(
select
event,
Min
(Date_Time)
as
minDate
FROM
TableName
group
by
Event)
as
t2
on
TableName.Event = t2.event
and
TableName.Date_Time = t2.minDate
Order
By
TablName.Event
through above Query finally got this result.. in this i need single record for event name burry. i have draw table in below i need like that with that two reocrd
Reply
Answers (
4
)
How to get value portion key to every rn from 1 to 3 row on one row?
SQl Query Through Plus Minus Stock Statement