Smart Query lets you describe what you want, then reviews a generated SQL statement you can edit and run. It’s designed for speed and safety—Postgres-only, single-statement execution, and strict schema enforcement for your company.
The generated SQL appears in an editable box. Adjust filters, add columns, tweak grouping and ordering. The Console enforces a single SQL statement for safety.
DATE_FORMAT or YEAR() with Postgres equivalents (e.g., TO_CHAR, EXTRACT, DATE_TRUNC). Cast text date columns to ::date when grouping by month/day.Confirm table/column names (lowercase) and date ranges. Validate joins and casts (e.g., text to ::date or ::timestamp).
Remove extra semicolons, stray CTEs, or comments that create multiple statements. Keep it to one SELECT ....
Ensure join keys match in type. For time grouping, try DATE_TRUNC('month', your_ts) and ensure your_ts is a timestamp or cast appropriately.
Next: build visuals in the Report Builder.