Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove null address from delegator count #563

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP VIEW IF EXISTS num_active_delegator_per_pool;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, down should just be the previous query right? Or is this a new view?

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;
Loading