Skip to content

Commit

Permalink
Scientific notation string to text;
Browse files Browse the repository at this point in the history
  • Loading branch information
mismirnov committed Jan 16, 2025
1 parent cd39129 commit bcd85fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion database/views/26_tvs_by_day.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CREATE MATERIALIZED VIEW IF NOT EXISTS tvs_by_day
WITH (timescaledb.continuous, timescaledb.materialized_only=false) AS
select
time_bucket('1 day'::interval, logs.time) AS time,
sum(logs.value) as value
sum(logs.value)::TEXT as value
from tvl as logs
group by 1
with no data;
Expand Down
6 changes: 3 additions & 3 deletions database/views/27_tvs_by_month.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ CREATE MATERIALIZED VIEW IF NOT EXISTS tvs_by_month
WITH (timescaledb.continuous, timescaledb.materialized_only=false) AS
select
time_bucket('1 month'::interval, logs.time) AS time,
min(logs.value)::DOUBLE PRECISION AS min_value,
max(logs.value)::DOUBLE PRECISION AS max_value,
last(logs.value, time)::DOUBLE PRECISION AS value
min(logs.value)::TEXT AS min_value,
max(logs.value)::TEXT AS max_value,
last(logs.value, time)::TEXT AS value
from tvl as logs
group by 1
with no data;
Expand Down

0 comments on commit bcd85fb

Please sign in to comment.