alirsm-v-0-05
Updated 2022-08-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
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with base as (
select
concat('0x',substr(data,27,40)) as game_contract,
regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') AS split_data,
ethereum.public.udf_hex_to_int(concat('0x', SUBSTR(split_data [17], 25, 40))) AS tag
from optimism.core.fact_event_logs
where
topics[0] like '%0x889e2060e46779287c2fcbf489c195ef20f5b44a74e3dcb58d491ae073c1370f%'
and origin_to_address = '0x2b91c14ce9aa828ed124d12541452a017d8a2148'
and BLOCK_TIMESTAMP::date >= CURRENT_DATE -14 )
select
date(block_timestamp) as days,
tag,
CASE
when tag = 9001 then 'NCAA - American Football'
when tag = 9002 then 'NFL - American Football'
when tag = 9003 then 'MLB - Baseball'
when tag = 9004 then 'NBA - Basketball'
when tag = 9005 then 'NCAA - Basketball'
when tag = 9006 then 'NHL - Hockey'
when tag = 9007 then 'MMA'
when tag = 9008 then 'WNBA'
when tag = 9010 then 'MLS - Soccer'
when tag = 9011 then 'EPL - Soccer'
when tag = 9012 then 'Ligue 1 - Soccer'
when tag = 9013 then 'Bundesliga - Soccer'
when tag = 9014 then 'La Liga - Soccer'
when tag = 9015 then 'Serie A - Soccer'
when tag = 9016 then 'UEFA Champions League - Soccer'
else null
end as sport_Name,
Run a query to Download Data