I have a view that returns the following:
select * from latest_report
projectname contractor_name date
Barry O&M Vulcan 01/01/2007
Barry O&M Vulcan 02/01/2007
Barry O&M Vulcan 03/01/2007
Smith O&M PCI 01/01/2007
Smith O&M PCI 02/01/2007
Smith O&M PCI 03/01/2007
I need it to return the ones with the largest date:
Barry O&M Vulcan 03/01/2007
Smith O&M PCI 03/01/2007
I tried:
select projectname, contractor_name, max(start_date) from latest_report
but that does not work. Any ideas?
David
select * from latest_report
projectname contractor_name date
Barry O&M Vulcan 01/01/2007
Barry O&M Vulcan 02/01/2007
Barry O&M Vulcan 03/01/2007
Smith O&M PCI 01/01/2007
Smith O&M PCI 02/01/2007
Smith O&M PCI 03/01/2007
I need it to return the ones with the largest date:
Barry O&M Vulcan 03/01/2007
Smith O&M PCI 03/01/2007
I tried:
select projectname, contractor_name, max(start_date) from latest_report
but that does not work. Any ideas?
David