superflyUntitled Query
Updated 2022-09-20
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
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
(with min1 as
(select distinct event_inputs:addr::string as contract_auction
from ethereum.core.fact_event_logs where event_name = 'MarketCreated'
and origin_to_address = '0x7603a35af5cf10b113f167d424eb75bb7062c8ce')
select date_trunc('day', block_timestamp) AS date,'Ethereum' as chain, count (distinct origin_from_address) as users, count (distinct tx_hash) as txs
from ethereum.core.fact_event_logs
where origin_to_address in (select contract_auction from min1)
and origin_function_signature in ('0x29762960','0xdc97e082')
group by 1)
UNION ALL
(with min2 as
(select distinct event_inputs:addr::string as contract_auction
from polygon.core.fact_event_logs
where event_name = 'MarketCreated'
and origin_to_address = '0xc040f84cf7046409f92d578ef9040fe45e6ef4be')
select date_trunc('day', block_timestamp) AS date,'Polygon' as chain, count (distinct origin_from_address) as users, count (distinct tx_hash) as txs
from polygon.core.fact_event_logs
where origin_to_address in (select contract_auction from min2)
and origin_function_signature in ('0x29762960','0xdc97e082')
group by 1)
UNION ALL
(with min3 as
(select distinct event_inputs:addr::string as contract_auction
from bsc.core.fact_event_logs
where event_name = 'MarketCreated' and origin_to_address = '0x5629ce74ddcad7cc72b3ea30444da7172ad851d9')
select date_trunc('day', block_timestamp) AS date,'BSC' as chain,count (distinct origin_from_address) as users, count (distinct tx_hash) as txs
from bsc.core.fact_event_logs
where origin_to_address in (select contract_auction from min3)
and origin_function_signature in ('0x29762960','0xdc97e082')
group by 1)
UNION ALL
(with min4 as ( select distinct event_inputs:addr::string as contract_auction
from avalanche.core.fact_event_logs
where event_name = 'MarketCreated'
and origin_to_address = '0x438a2b1c6c715fb1b051c04ca65755560d8b8d43')
select date_trunc('day', block_timestamp) AS date, 'Avalanche' as chain, count (distinct origin_from_address) as users, count (distinct tx_hash) as txs