Abolfazl_771025games received the most activity in users total count
Updated 2022-08-25Copy Reference Fork
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
›
⌄
with main as (
select
b.contract_address as token_contract,
a.from_address as bettor,
regexp_substr_all(SUBSTR(input_data, 11, len(input_data)), '.{64}') AS data,
concat('0x', substr(data[0], 25, 40)) as game_contract
from optimism.core.fact_transactions a inner join optimism.core.fact_token_transfers b on b.tx_hash = a.tx_hash
where a.tx_hash in (select tx_hash from optimism.core.fact_token_transfers
where block_timestamp >= CURRENT_DATE - 14
and to_address = '0x170a5714112daeff20e798b6e92e25b86ea603c1'
and origin_function_signature in ('0x8875eb84','0x6cc5a6ff'))
group by 1,2,3,4
)
select
case
when game_contract = '0xce01adb39cb9864020fe4e77b1f5a6f01305ae95' then 'Baltimore Orioles vs Boston Red Sox'
when game_contract = '0x40ce1a576ef8c67145a4cc0e3cda198b9dd13de6' then 'Baltimore Orioles vs Boston Red Sox'
when game_contract = '0xae0d0e7c5d9f8d8c17eb48b8d00a823c14dda3e2' then 'Arsenal FC vs Leicester City'
when game_contract = '0x17351dd7d1e92ce0cf97efab61ebe3f6d4ff6015' then 'Brentford FC vs Manchester United'
when game_contract = '0xa7e41e8d5cabf63eea144af3bed65487a5d283bd' then 'Chelsea vs Tottenham Hotspur'
when game_contract = '0x07fb8f06addf5bf57eaae34e21cf505ab2afaf21' then 'Manchester United vs Liverpool'
when game_contract = '0x3be64d5c16f81a9dd7a431446a7f0a3e9b51fbaf' then 'Newcastle United vs Manchester City'
when game_contract = '0x47362c82f537935f64e60ca6bd3f16583e11b5ca' then 'Liverpool vs Crystal Palace'
when game_contract = '0xbc70b2b4aa4b2660618734184675a0ed2c8f96ee' then 'Leon Edwards vs Kamaru Usman '
when game_contract = '0x274e9d883c101509805b163eaa806ef6628581a2' then 'Tottenham Hotspur vs Wolverhampton'
end as "match",
game_contract,
count(distinct bettor) as user_count
from main
group by 1,2
order by 3 DESC
limit 10
Run a query to Download Data