How do I compare this year vs last year with iDBQuery?
Ask iDBQuery 'Compare revenue this year to last year by month, with the percentage change,' and it writes the period-over-period SQL, aligns the calendars, and returns a cited YoY table or chart. Swap 'year' for 'quarter,' 'week,' or 'same period last year' just as easily.
Year-over-year and period-over-period comparisons are the backbone of performance reporting, and iDBQuery writes the tricky date logic for you: - Connect the source with the metric you care about. - Ask 'Compare revenue this year to last year by month, with the percentage change.' - iDBQuery aligns the two calendars, computes the deltas, and returns a cited table or a two-series chart.
The same pattern covers any comparison: 'this quarter vs the same quarter last year,' 'trailing 90 days vs the prior 90,' or 'this week vs last week.' Ask for it and iDBQuery adjusts the windows correctly, including partial-period alignment so you compare like with like.
A worked example: a finance lead asks 'Show YoY growth by product line and highlight any line that shrank.' iDBQuery computes each line's change, flags the decliners, and lets you drill into the rows behind any figure.
The differentiator is that you skip the fiddly date arithmetic, offsets, fiscal calendars and leap years, that makes period comparisons error-prone in spreadsheets. Because iDBQuery grounds the query in your real schema and shows the SQL, you can confirm exactly which dates it used. And every figure is cited to source rows, so a growth number you present is auditable. Save it as a live report and the comparison rolls forward automatically each period.
Updated 2026-06-22