aquarius icon indicating copy to clipboard operation
aquarius copied to clipboard

Stats Command

Open IanMitchell opened this issue 4 years ago • 1 comments

Run this query and output results:

SELECT
	category,
	COUNT(category) AS value_occurrence
FROM
	analytic_events
WHERE
	context ->> 'userId' = '176793948025520128'
GROUP BY
	category
ORDER BY
	value_occurrence DESC
LIMIT 10;

IanMitchell avatar Apr 08 '21 19:04 IanMitchell

Per Sindalf, this should be added:

CREATE INDEX context_userid ON analytic_events USING btree ((context -> 'userId'));

IanMitchell avatar Apr 08 '21 19:04 IanMitchell