Skip to content

Commit

Permalink
remove null address from delegator count (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
ying-w authored Oct 24, 2024
1 parent b0aa88f commit 56a5b05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP VIEW IF EXISTS num_active_delegator_per_pool;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- need this for delegation staking
CREATE OR REPLACE VIEW num_active_delegator_per_pool AS
SELECT pool_address,
COUNT(DISTINCT delegator_address) AS num_active_delegator
FROM current_delegator_balances
WHERE shares > 0
AND delegator_address != '0x0000000000000000000000000000000000000000000000000000000000000000'
AND pool_type = 'active_shares'
GROUP BY 1;

0 comments on commit 56a5b05

Please sign in to comment.