This is definitely “advanced usage only” and neither reports nor modules were intended to be used in this way, but with the new physical table functionality and some minor hackery, you can now use SQL views inside of the reports builder.
Steps
Create a module with the correct fields and module name. These will be the fields for the view. Remove all of the ancellary default and audit fields like recordId and createdAt.
In the DB, drop the table
Create a view with the same field types and field names from step 1. Make sure the view name matches the module handle
Add a single load in the report builder and you’re done
CREATE VIEW "ChildAggView" AS
SELECT
SUM("Amount") "TotalAmount", p."Name" "Parent"
FROM "Child"
JOIN "Parent" p on p.id = "Child"."Parent"
GROUP BY p."Name";
Nice this is very interesting and we are really happy with the way you are experimenting with Corteza! Our developers and community will definitely find this useful so thank you.
Did you configure the fields to point to the correct columns of your view? When editing a module, under the data store tab; you can configure where the data comes from.
Well… it’s not configured correctly…
See your values, it’s NULL. The two columns you want are weekday and inquiry_count; change those two selects to column and it should work