Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order event data in descending order by count #2700

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/queries/analytics/eventData/getEventDataEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
and event_data.created_at between {{startDate}} and {{endDate}}
and website_event.event_name = {{event}}
group by website_event.event_name, event_data.data_key, event_data.data_type, event_data.string_value
order by 1 asc, 2 asc, 3 asc, 4 desc
order by 1 asc, 2 asc, 3 asc, 5 desc
`,
params,
);
Expand Down Expand Up @@ -81,7 +81,7 @@ async function clickhouseQuery(
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
and event_name = {event:String}
group by data_key, data_type, string_value, event_name
order by 1 asc, 2 asc, 3 asc, 4 desc
order by 1 asc, 2 asc, 3 asc, 5 desc
limit 500
`,
params,
Expand Down