Goals -System refactored - Platzhaltersystem enhanced (als draft) #53
|
|
@ -713,7 +713,7 @@ def _get_historical_value_for_goal_type(conn, profile_id: str, goal_type: str, t
|
|||
FROM {source_table}
|
||||
WHERE profile_id = %s
|
||||
AND {date_col} BETWEEN %s AND %s
|
||||
ORDER BY ABS(EXTRACT(EPOCH FROM ({date_col} - %s::date)))
|
||||
ORDER BY ABS({date_col} - %s::date)
|
||||
LIMIT 1
|
||||
""", (
|
||||
profile_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user