Reusable queries for reporting

How queries are made to last.

1What it covers

How queries are made to last. The topic covers the saving of a query with a clear name, the use of parameters for period and entity, views that hold shared logic, the comments that explain the choices, the version of the query used for each report, and the hand-over to another person. It starts with a query written once and ends with logic that anyone on the team can rerun and trust.

2Why it matters

A query that only the author understands stops working when the author leaves. Parameters turn a one-off into a monthly routine. Shared logic in one place avoids two reports that disagree.

3The skill it belongs to

4Roles that use it

Updated 5 Nov 2026