about summary refs log tree commit diff
path: root/db/views/follow_recommendations_v01.sql
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-30 22:51:32 +0100
committerGitHub <noreply@github.com>2022-01-30 22:51:32 +0100
commitb54e263712a9f2b3d4ff0d7b692565d8e24dc03b (patch)
tree88600c7253f9a929ae30cef4644e2663f41788e6 /db/views/follow_recommendations_v01.sql
parent2ba6267f1603cee682bfe3885b797ad5df7e958f (diff)
parent7679ddcd5ee289f847f8a4836a0b0220d433bae6 (diff)
Merge pull request #1673 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/views/follow_recommendations_v01.sql')
-rw-r--r--db/views/follow_recommendations_v01.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/views/follow_recommendations_v01.sql b/db/views/follow_recommendations_v01.sql
index 799abeaee..8295bbc0f 100644
--- a/db/views/follow_recommendations_v01.sql
+++ b/db/views/follow_recommendations_v01.sql
@@ -20,7 +20,7 @@ FROM (
   HAVING count(follows.id) >= 5
   UNION ALL
   SELECT accounts.id AS account_id,
-         sum(reblogs_count + favourites_count) / (1.0 + sum(reblogs_count + favourites_count)) AS rank,
+         sum(status_stats.reblogs_count + status_stats.favourites_count) / (1.0 + sum(status_stats.reblogs_count + status_stats.favourites_count)) AS rank,
          'most_interactions' AS reason
   FROM status_stats
   INNER JOIN statuses ON statuses.id = status_stats.status_id
@@ -32,7 +32,7 @@ FROM (
     AND accounts.locked = 'f'
     AND accounts.discoverable = 't'
   GROUP BY accounts.id
-  HAVING sum(reblogs_count + favourites_count) >= 5
+  HAVING sum(status_stats.reblogs_count + status_stats.favourites_count) >= 5
 ) t0
 GROUP BY account_id
 ORDER BY rank DESC