Fixed a bug in the current conditions query (prior function not implemented by postgres)
Some checks failed
ci/woodpecker/push/build-image Pipeline failed
Some checks failed
ci/woodpecker/push/build-image Pipeline failed
This commit is contained in:
@@ -22,18 +22,7 @@ SELECT
|
||||
AVG(dewpoint_c) AS dewpoint_c,
|
||||
AVG(relative_humidity_percent) AS relative_humidity_percent,
|
||||
AVG(wind_speed_kmh) AS wind_speed_kmh,
|
||||
CASE
|
||||
WHEN COUNT(wind_direction_degrees) FILTER (WHERE wind_direction_degrees IS NOT NULL) = 0 THEN NULL
|
||||
ELSE MOD(
|
||||
DEGREES(
|
||||
ATAN2(
|
||||
AVG(SIN(RADIANS(wind_direction_degrees))),
|
||||
AVG(COS(RADIANS(wind_direction_degrees)))
|
||||
)
|
||||
) + 360.0,
|
||||
360.0
|
||||
)
|
||||
END AS wind_direction_degrees,
|
||||
AVG(wind_direction_degrees) AS wind_direction_degrees,
|
||||
MAX(condition_code) AS condition_code,
|
||||
(
|
||||
SELECT is_day
|
||||
|
||||
Reference in New Issue
Block a user