Delete me1 AP Year End - Top 10 Vendors
This query lists top 10 Vendors for prior year. The "Invoice Sum" field is optional, but useful to verify the totals.
select v.vend_id,v.name,v.city,v.state,v.last_year_purchases, (select sum(gross_amount) from aptinvhd ih where ih.vend_id=v.vend_id and invoice_date between :"Year Begin" and :"Year End") "Invoice Sum" from aptvend v order by last_year_purchases desc rows 1 to 10
NOTE: This query assumes the year end processing has been run.