Skip to content

The time interval of the demo code is incorrect #1017

@kallydev

Description

@kallydev

Describe the bug

Document typo.

What do the docs say now?

-----------------------------------
-- time_bucket
-- Average temp per 15 day period
-- for past 6 months, per city
-----------------------------------
SELECT time_bucket('15 days', time) as "bucket"
   ,city_name, avg(temp_c)
   FROM weather_metrics
   WHERE time > now() - (12* INTERVAL '1 month')
   GROUP BY bucket, city_name
   ORDER BY bucket DESC;

What should the docs say?

-----------------------------------
-- time_bucket
-- Average temp per 15 day period
-- for past 6 months, per city
-----------------------------------
SELECT time_bucket('15 days', time) as "bucket"
   ,city_name, avg(temp_c)
   FROM weather_metrics
   WHERE time > now() - (6 * INTERVAL '1 month')
   GROUP BY bucket, city_name
   ORDER BY bucket DESC;

Page affected

https://docs.timescale.com/timescaledb/latest/getting-started/query-data/

Version affected

Last v2.X

Subject matter expert (SME)

N/A

Screenshots

image

Any further info

N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions