Need query to produce report all vendors and invoice numbers showing only the vendors/invoices with
I used this query to produce a report of all vendors from 2008-2014 with ALL of their respective invoice info (including invoice number), but, customer would like to only see the info (vendor_name, invoice_date) with the most recent invoice date.
select /*csv*/ aps.vendor_name, aia.invoice_date, aia.invoice_amount,
aia.invoice_id,
aia.invoice_num
from ap.ap_suppliers aps,
ap.ap_invoices_all aia
where aps.vendor_id = aia.vendor_id
order by aps.vendor_name, aia.invoice_date
Note: I'm a core DBA using SQL developer to produce the report with limited knowledge of the E-Business Suite (12.0.6) data model. Help!