Accounts receivable aging is a critical cash flow signal. This query finds every overdue invoice in QuickBooks, ranked by amount outstanding and days past due.
This is part of the Taptic Data QuickBooks query library. Explore related queries: SQL query for QuickBooks net income by month and SQL query for QuickBooks overdue invoices by customer.
The question
The SQL Taptic generates
SELECT c.display_name AS customer, c.primary_email_addr AS email, COUNT(i.id) AS overdue_invoices, ROUND(SUM(i.balance)::numeric, 2) AS total_owed, MAX(CURRENT_DATE - i.due_date::date) AS max_days_overdue, MIN(i.due_date::date) AS oldest_due_date, ROUND(AVG(i.balance)::numeric, 2) AS avg_invoice_balance FROM qbo_invoices i JOIN qbo_customers c ON c.id = i.customer_id WHERE i.balance > 0 AND i.due_date::date < CURRENT_DATE AND i.transaction_status NOT IN ('Void', 'Deleted') GROUP BY c.id, c.display_name, c.primary_email_addr ORDER BY total_owed DESC
This query was generated by Taptic Data from plain English against a real QuickBooks Online schema. In Taptic, you type the question — the AI writes the SQL, runs it, and returns the result. You can edit the SQL, ask for explanations, and save it as a refreshable report. This type of analysis is commonly used in quickbooks financial reporting.
How this query works
What it returns
Every customer with at least one overdue invoice, showing total amount owed, number of overdue invoices, maximum days overdue, and oldest due date.
Why it matters
All queries and use cases on this page relate to analyzing your QuickBooks Online data in Taptic. To see the full analytics workflow, explore quickbooks financial reporting.
FAQ
Generate this automatically
In Taptic Data, you type "Show me all overdue invoices by customer with amount owed an..." and this SQL runs automatically against your real QuickBooks Online data.
Try Taptic Free — $29.99/moNo credit card required. Connect your data source in under 5 minutes.
Related use cases
Compare tools