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
nishant ranjan
NA
390
0
SQL Query
Jan 23 2012 2:46 AM
companyid boxid tableid time
1 1 1 11.55
1 2 1 11.58
1 1 1 12.00
1 1 1 12.05
2 1 1 8.00
2 1 1 8.05
2 2 3 9.05
2 2 3 9.10
3 1 5 13.00
3 1 5 13.05
sql query....
output
1 1 1 11.55
2 1 1 8.00
3 1 5 13.00
how i can i use distinct on company id basis here as on each row time is different
i want query where row should be selected on distinct company id basis and min time for that id
what query i should use
Reply
Answers (
2
)
materialized View
In Query use variable like Dynamic SQL