{"key":"Gu5z9KND","title":"most active users query","syntax":"sql","exposure":"public","category":"none","views":149,"size_bytes":243,"created_at":"2026-08-28T15:13:25+00:00","expires_at":null,"url":"https:\/\/note.pixiefix.top\/Gu5z9KND","raw_url":"https:\/\/note.pixiefix.top\/raw\/Gu5z9KND","content":"SELECT u.id,\n       u.name,\n       COUNT(p.id) AS paste_count,\n       COALESCE(SUM(p.views), 0) AS total_views\nFROM users u\nLEFT JOIN pastes p ON p.user_id = u.id\nGROUP BY u.id, u.name\nHAVING paste_count > 0\nORDER BY total_views DESC\nLIMIT 25;"}