Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Max of Date using Aggregation
Input:
Empid start_date End_date Sal
1 2015-01-01 2015-12-31 1000
1 2016-01-01 2017-05-29 2000
2 2014-01-01 2015-12-31 1000
2 2016-01-01 2017-03-15 800
3 2011-01-01 2015-12-31 1000
3 2016-01-01 2017-05-10 1200
4 2016-01-01 2017-02-14 2000
Output_Should be like below:
Empid Min_date Max_Date Total_Sal
1 2015-01-01 2017-05-29 3000
2 2014-01-01 2017-03-15 1800
3 2011-01-01 2017-05-10 2200
4 2016-01-01 2017-02-14 2000
This Question is not yet answered!
Related Answered Questions
Related Open Questions