Request for SQL Query

0 votes

Hi team,

How can I get a distinct ID and date from 2nd table (based on ID Column we need to get max date for each ID)?

Table one Table two
ID ID Date
1 1 8/6/2020
2 1 7/6/2020
3 2 8/6/2020
4 2 7/6/2020
5 3 8/6/2020
6 3 7/6/2020
7 4 8/6/2020
8 4 7/6/2020
9 5 8/6/2020
10 5 7/6/2020
6 5/6/2020
6 4/6/2020
7 5/6/2020
7 4/6/2020
8 5/6/2020
8 4/6/2020
9 3/6/2020
9 2/6/2020
10 3/6/2020
10 2/6/2020

Sample output:

1 1 8/6/2020
2 2 8/6/2020
3 3 8/6/2020
Jun 8, 2020 in Database by vnk
• 390 points
221 views

Hii vnk ,

Can you please provide more details about what you want and what you are tryig to do?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,830 points
8,050 views
0 votes
1 answer

How to schedule a job for sql query to run daily?

Hii, To schedule a job for sql query ...READ MORE

answered May 4, 2020 in Database by Niroj
• 82,740 points
888 views
0 votes
1 answer

SQL Server replaces LEFT JOIN for LEFT OUTER JOIN in view query

You are getting the joins confused and ...READ MORE

answered Feb 4 in Database by Neha
• 8,740 points
131 views
0 votes
2 answers

Write a SQL query to find the names of employees that begin with ‘S’

Select ename From emp Where ename like"s%"; READ MORE

answered Oct 7, 2021 in Database by anonymous
13,676 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 27, 2018 in Database by Sahiti
• 6,380 points
7,382 views
0 votes
1 answer

Which operator is used in the query for pattern matching?

LIKE operator is used for pattern matching, ...READ MORE

answered Oct 15, 2018 in Database by DataKing99
• 8,240 points
15,808 views
0 votes
1 answer

Which query to use for better performance, join in SQL or using Dataset API?

DataFrames and SparkSQL performed almost about the ...READ MORE

answered Apr 19, 2018 in Apache Spark by kurt_cobain
• 9,390 points
973 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by Parth
• 4,630 points
901 views
0 votes
1 answer
0 votes
1 answer

How to deploy Liberty packaged server automatic delivery

Here is a concept regarding your query. It ...READ MORE

answered Jul 11, 2018 in DevOps Tools by Atul
• 10,230 points
320 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP