nitsTop 5 Sponsors by different number of contract participation
Updated 2022-06-26
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
›
⌄
with tx as
(SELECT DISTINCT tx_hash from ethereum.core.fact_event_logs
where contract_address = lower('0xcA69d7aE5F6a5A3FdBB66b2C6cAA1a2928c7CD2f')),
ctr as
(SELECT DISTINCT contract_address as contracts
from ethereum.core.fact_event_logs
where tx_hash in (SELECT * from tx))
-- SELECT contract_address, count(DISTINCT tx_hash) as total_calls from
-- ethereum.core.fact_event_logs
-- where contract_address in (SELECT * from ctr )
-- GROUP by 1
-- ORDER by 2 desc
-- select date(block_timestamp) as day, sum(amt) as total_amt,
-- sum( total_amt) over (order by day) as cumulative_amt from
SELECT addr, COUNT(DISTINCT contract_address) as total_contracts from
(SELECT *, event_inputs:contributor as addr from ethereum.core.fact_event_logs
WHERE contract_address in (SELECT * from ctr) and event_name = 'Contribution')
GROUP by 1
order by 2 desc
-- where tx_hash = '0xebe96fe53b240254306c11e349701aeb31c43bc512ca709f3fb771195fc19809'
limit 5
Run a query to Download Data