Skip to content

Commit

Permalink
fix date formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristramg committed Dec 15, 2024
1 parent 7240b2a commit 1c2f543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prepare.sql
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ CREATE TABLE daily AS
SELECT
id_compteur,
sum(sum_counts)::INTEGER AS sum_counts,
date_trunc('day', date)::TEXT as date,
date_trunc('day', date).strftime('%Y-%m-%d') as date,
FROM merged_counters
GROUP BY id_compteur, date_trunc('day', date);

Expand All @@ -143,7 +143,7 @@ CREATE TABLE weekly AS
SELECT
id_compteur,
sum(sum_counts)::INTEGER AS sum_counts,
date_trunc('week', date)::TEXT as date
date_trunc('week', date).strftime('%Y-%m-%d') as date
FROM merged_counters
GROUP BY id_compteur, date_trunc('week', date);

Expand Down

0 comments on commit 1c2f543

Please sign in to comment.