Victoria Yudin has a new SQL view for vendor yearly totals in Dynamics GP.
SQL view for vendor yearly totals in Dynamics GP | Victoria Yudin
SQL & DataPayables & Receivables
Archived post from 2012. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.