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 in Database by vnk
• 310 points
64 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,810 points
1,046 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 in Database by Niroj
• 44,800 points
123 views
0 votes
1 answer

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

To display the name of the employees ...READ MORE

answered Sep 26, 2018 in Database by Sahiti
• 6,290 points
173 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 26, 2018 in Database by Sahiti
• 6,290 points
1,574 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,150 points
717 views
0 votes
0 answers

Which SQL server should we use for SQL queries to be executed?

I mean to say which SQL server ...READ MORE

Aug 17, 2019 in Database by Sonali
70 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,310 points
320 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
413 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
115 views