Report builder
Pick a subject area, a role and the fields. Everything on the left is the semantic layer, so nobody types a table name or a join. The icons mark the three kinds of field that requirement 8 asks be distinguishable: a dimension attribute, a calculated measure, a detail attribute.
Generated SQL
Requirement 5. This panel is read only, and this is the statement that runs. Nothing is rewritten between here and the warehouse.
SELECT dim_org.district_name AS "District", dim_fund.fund_name AS "Fund", SUM(fact_expenditure.amount) AS "Amount", COUNT(*) AS "Payment lines" FROM fact_expenditure JOIN dim_date ON fact_expenditure.date_key = dim_date.date_key JOIN dim_org ON fact_expenditure.org_key = dim_org.org_key JOIN dim_fund ON fact_expenditure.fund_key = dim_fund.fund_key JOIN dim_account ON fact_expenditure.account_key = dim_account.account_key JOIN dim_project ON fact_expenditure.project_key = dim_project.project_key JOIN dim_vendor ON fact_expenditure.vendor_key = dim_vendor.vendor_key WHERE dim_org.district_code = :home_district GROUP BY dim_org.district_name, dim_fund.fund_name ORDER BY SUM(fact_expenditure.amount) DESC LIMIT 200
Preview
Requirement 21. The result set is counted over the same joins and filters before any rows are returned.
| Result rows | 5 |
|---|---|
| Tables joined | 6 |
| Grouping fields | 2 |
| Complexity | Below every threshold. |
Result
5 rows returned in 72 ms. Amounts are printed as exact decimals: requirement 13 forbids truncating or rounding them.
| District | Fund | Amount | Payment lines |
|---|---|---|---|
| District 4, Oakland | State Highway Operation and Protection | 17,583,005.25 | 1,845.00 |
| District 4, Oakland | Trade Corridor Enhancement Account | 16,768,969.19 | 1,890.00 |
| District 4, Oakland | Public Transportation Account | 15,993,495.72 | 1,829.00 |
| District 4, Oakland | Federal Trust Fund | 15,988,229.26 | 1,824.00 |
| District 4, Oakland | State Highway Account | 15,663,653.52 | 1,876.00 |
Requirement 36 asks for export to text, HTML, comma separated values, Excel and PDF. Download these rows as CSV, which is the one of the five this example implements.