* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed metrics sort
This commit is contained in:
Kraiem Taha Yassine 2024-11-19 13:57:55 +01:00 committed by GitHub
parent 7eeb71ed25
commit f621f6ac00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -451,7 +451,7 @@ def search2_table(data: schemas.SessionsSearchPayloadSchema, project_id: int, de
{query_part}) AS filtred_sessions
{extra_where}
GROUP BY {main_col}
ORDER BY total_count DESC
ORDER BY total DESC
LIMIT %(limit_e)s OFFSET %(limit_s)s;"""
else:
main_query = f"""SELECT COUNT(DISTINCT {main_col}) OVER () AS main_count,
@ -464,7 +464,7 @@ def search2_table(data: schemas.SessionsSearchPayloadSchema, project_id: int, de
AND user_id != '') AS filtred_sessions
{extra_where}
GROUP BY {main_col}
ORDER BY total_count DESC
ORDER BY total DESC
LIMIT %(limit_e)s OFFSET %(limit_s)s;"""
main_query = cur.format(main_query, full_args)