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
492 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
9,782 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,880 points
3,688 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, 2022 in Database by Neha
• 9,060 points
1,123 views
0 votes
0 answers

ORA-01476: "divisor is equal to zero" for SQL query (Oracle 10g)

I'm creating a SQL query with Oracle ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,010 points
467 views
0 votes
0 answers

SQL query for distinct professors and courses

There is a database on instructors, departments, ...READ MORE

Aug 26, 2022 in Database by Kithuzzz
• 38,010 points
18,945 views
0 votes
0 answers

How do I query for all dates greater than a certain date in SQL Server?

I tried this: SELECT * FROM dbo.March2010 A WHERE ...READ MORE

Aug 29, 2022 in Database by Kithuzzz
• 38,010 points
581 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
1,538 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
1,611 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,240 points
598 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP