Skip to main content

Peliqan

Accounts payable aging report

SQL query for Quickbooks

Get accounts payable aging report.

SELECT VendorName, SUM(CASE WHEN DATEDIFF(day, DueDate, GETDATE()) <= 30 THEN Amount END) AS Current, SUM(CASE WHEN DATEDIFF(day, DueDate, GETDATE()) BETWEEN 31 AND 60 THEN Amount END) AS '31-60 Days', SUM(CASE WHEN DATEDIFF(day, DueDate, GETDATE()) BETWEEN 61 AND 90 THEN Amount END) AS '61-90 Days', SUM(CASE WHEN DATEDIFF(day, DueDate, GETDATE()) > 90 THEN Amount END) AS ‘Over 90 Days’ FROM AccountsPayable GROUP BY VendorName;

Quickbooks data model

Ready to get instant access to all your company data ?​

Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.