changeset 5444:5be842692d87

Revert dates in report template.
author Sascha Wilde <wilde@sha-bang.de>
date Wed, 14 Jul 2021 16:02:43 +0200
parents fbad74acd23f
children 0d6fb393c79a e36cadc51d35
files report-templates/data-quality-report.yaml
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/report-templates/data-quality-report.yaml	Wed Jul 07 20:11:17 2021 +0200
+++ b/report-templates/data-quality-report.yaml	Wed Jul 14 16:02:43 2021 +0200
@@ -34,9 +34,11 @@
     - type: select
       statement: >
         SELECT to_char(d, 'Month YYYY') AS month, d::date
-          FROM generate_series( '2019-10-01'::date,
-                                now() - interval '1 day',
-                                '1 month'::interval ) d;
+          FROM generate_series( date_trunc('month',
+                                           now() - interval '1 day'
+                                          )::date,
+                                '2019-10-01'::date,
+                                - '1 month'::interval ) d;
       actions:
       - type: assign
         name: column_number
@@ -89,9 +91,11 @@
     - type: select
       statement: >
         SELECT to_char(d, 'Month YYYY') AS month, d::date
-          FROM generate_series( '2019-10-01'::date,
-                                now() - interval '1 day',
-                                '1 month'::interval ) d;
+          FROM generate_series( date_trunc('month',
+                                           now() - interval '1 day'
+                                          )::date,
+                                '2019-10-01'::date,
+                                - '1 month'::interval ) d;
       actions:
       - type: assign
         name: column_number