Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
0xthrpw committed Aug 27, 2024
2 parents 693a124 + 7ecff8b commit d660d8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ BEGIN
(CASE WHEN direction = 'desc' THEN v.followers END) desc
LIMIT p_limit
OFFSET p_offset;
ELSEIF col = 'blocks' THEN
ELSEIF col = 'blocked' THEN
RETURN QUERY
SELECT *
FROM public.efp_leaderboard v
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ SELECT
fers.address,
COALESCE(ens.name) AS ens_name,
COALESCE(ens.avatar) AS ens_avatar,
RANK () OVER (
ORDER BY mut.mutuals DESC NULLS LAST
) as mutuals_rank,
-- RANK () OVER (
-- ORDER BY mut.mutuals DESC NULLS LAST
-- ) as mutuals_rank,
mut.mutuals_rank as mutuals_rank,
RANK () OVER (
ORDER BY fers.followers_count DESC NULLS LAST
) as followers_rank,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
-------------------------------------------------------------------------------
CREATE
OR REPLACE VIEW PUBLIC.view__events__efp_leaderboard_mutuals AS
SELECT public.hexlify(r.record_data) as leader, COUNT(r.record_data) as mutuals
SELECT
public.hexlify(r.record_data) as leader,
COUNT(r.record_data) as mutuals,
rank() OVER (ORDER BY count(record_data) DESC NULLS LAST) AS mutuals_rank
FROM public.view__join__efp_list_records_with_nft_manager_user_tags r
WHERE public.hexlify(r.record_data) <> r.user
AND EXISTS (
Expand Down

0 comments on commit d660d8b

Please sign in to comment.