mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
1) Created components for statistic reporting. 2) Database changes and PROC/Function creations. Still need to make MOST VIEWED LIBRARIES/CLIENTS/ MOST ACTIVE USERS dynamically load with date range (Function Creation on DB side)
17 lines
428 B
SQL
17 lines
428 B
SQL
-- View: public.js_most_active_user
|
|
|
|
-- DROP VIEW public.js_most_active_user;
|
|
|
|
CREATE OR REPLACE VIEW public.js_most_active_user
|
|
AS
|
|
SELECT count(*) AS "Plays",
|
|
jf_playback_activity."UserId",
|
|
jf_playback_activity."UserName"
|
|
FROM jf_playback_activity
|
|
GROUP BY jf_playback_activity."UserId", jf_playback_activity."UserName"
|
|
ORDER BY (count(*)) DESC;
|
|
|
|
ALTER TABLE public.js_most_active_user
|
|
OWNER TO postgres;
|
|
|