@golemio/rush-hour-aggregation 1.5.2-dev.2941756587 → 1.5.2-dev.2946823454

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/rush-hour-aggregation",
3
- "version": "1.5.2-dev.2941756587",
3
+ "version": "1.5.2-dev.2946823454",
4
4
  "description": "Rush hour data aggregation for Praha dopravní project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +1,4 @@
1
- select
1
+ select distinct on (a.source_identification, date_trunc('minute'::text, a.measurement_or_calculation_time))
2
2
  a.source_identification,
3
3
  date_part('epoch'::text, date_trunc('minute'::text, a.measurement_or_calculation_time)) * 1000::double precision as measured_at,
4
4
  g.oriented_route,
@@ -17,3 +17,7 @@ join praha_dopravni.fcd_geos_praha_dopravni g on
17
17
  a.source_identification::text = g.source_identification::text
18
18
  where
19
19
  a.measurement_or_calculation_time between $from and $to
20
+ order by
21
+ a.source_identification,
22
+ date_trunc('minute'::text, a.measurement_or_calculation_time),
23
+ a.measurement_or_calculation_time desc