That brings back 2 rows which look identical. “Top 50 Quality Users”
Weirdly if I do:
[3] pry(main)> PluginStoreRow.where(plugin_name: 'discourse-data-explorer', key: "q:-7")
=> [#<PluginStoreRow:0x000055e280408bf8
id: 1286,
plugin_name: "discourse-data-explorer",
key: "q:-7",
type_name: "JSON",
value:
"{\"id\":-7,\"name\":\"Top 50 Quality Users\",\"description\":\"based on post score calculated using reply count, likes, incoming links, bookmarks, time spent and read count.\",\"sql\":\"SELECT sum(p.score) / count(p) AS \\\"average score per post\\\",\\n count(p.id) AS post_count,\\n p.user_id\\nFROM posts p\\nJOIN users u ON u.id = p.user_id\\nWHERE p.created_at \\u003e= CURRENT_DATE - INTERVAL '6 month'\\nAND NOT u.admin\\nAND u.active\\nGROUP BY user_id,\\n u.views\\nHAVING count(p.id)
\\u003e 50\\nORDER BY sum(p.score) / count(p) DESC\\nLIMIT 50\\n\",\"created_by\":\"-1\",\"created_at\":null,\"group_ids\":[],\"last_run_at\":\"2020-01-03T18:06:31.966+00:00\"}">]
It looks like I have just one row with id -7?