SEASON | FUELROD | STX | SRUN | BTX | BRUN | TOT_RUN | |
---|---|---|---|---|---|---|---|
1 | 65 | 1 | 195 | 195 | 60 | 430 | 625 |
2 | 65 | 0 | 7 | 7 | 234 | 5446 | 5453 |
3 | 64 | 1 | 1164 | 1164 | 937 | 9802 | 10966 |
4 | 64 | 0 | 43 | 43 | 438 | 10051 | 10094 |
5 | 63 | 1 | 1064 | 1064 | 906 | 9375 | 10439 |
6 | 63 | 0 | 42 | 42 | 686 | 15804 | 15846 |
7 | 62 | 1 | 1030 | 1030 | 859 | 9044 | 10074 |
8 | 62 | 0 | 59 | 59 | 611 | 14081 | 14140 |
9 | 61 | 1 | 1067 | 1067 | 863 | 9158 | 10225 |
10 | 61 | 0 | 38 | 38 | 482 | 10952 | 10990 |
11 | 60 | 1 | 968 | 968 | 730 | 7914 | 8882 |
12 | 60 | 0 | 46 | 46 | 514 | 11966 | 12012 |
13 | 59 | 1 | 1058 | 1058 | 821 | 8524 | 9582 |
14 | 59 | 0 | 50 | 50 | 622 | 14302 | 14352 |
15 | 58 | 1 | 1022 | 1022 | 729 | 7716 | 8738 |
16 | 58 | 0 | 64 | 64 | 785 | 18765 | 18829 |
17 | 57 | 1 | 1023 | 1023 | 689 | 6916 | 7939 |
18 | 57 | 0 | 74 | 74 | 450 | 10082 | 10156 |
19 | 56 | 1 | 1044 | 1044 | 706 | 7457 | 8501 |
20 | 56 | 0 | 64 | 64 | 427 | 9662 | 9726 |
banterlyticsadv-run
Updated 2024-02-17
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
›
⌄
with boundaries as
(select
ethereum.public.udf_hex_to_int(regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}')[0])::integer as season,
block_timestamp,
COALESCE(LEAD(block_timestamp) OVER (ORDER BY block_timestamp),to_timestamp(100000000000)) as next_timestamp
from polygon.core.fact_event_logs
where block_timestamp::date BETWEEN '2022-03-13' and '2024-01-07'
and contract_address = '0x70c575588b98c1f46b1382c706adaf398a874e3e'
and topics[0]::string = '0x9b492ca62dd845faf66276dbd14ed82e0d819d8b172cb51433ffe4268ab3dd9e')
SELECT boundaries.season,
ethereum.public.udf_hex_to_int(regexp_substr_all(SUBSTR(INPUT, 11, len(INPUT)), '.{64}')[1]) as fuelrod,
count(case when SUBSTR(INPUT, 1, 10) = lower('0x11237ba0') then TX_HASH end) as stx,
count(case when SUBSTR(INPUT, 1, 10) = lower('0x11237ba0') then TX_HASH end) as srun,
count(case when SUBSTR(INPUT, 1, 10) = lower('0xd422b242') then TX_HASH end) as btx,
coalesce(sum(case when SUBSTR(INPUT, 1, 10) = lower('0xd422b242') then ethereum.public.udf_hex_to_int(regexp_substr_all(SUBSTR(INPUT, 11, len(INPUT)), '.{64}')[2]) end),0) as brun,
coalesce(srun,0)+coalesce(brun,0) as tot_run
FROM polygon.core.fact_traces ftt
LEFT OUTER JOIN boundaries ON
ftt.block_timestamp >= boundaries.block_timestamp AND
ftt.block_timestamp < boundaries.next_timestamp
WHERE ftt.block_timestamp::date BETWEEN '2022-03-13' and '2024-01-07'
and tx_status = 'SUCCESS'
and to_address = lower('0x70c575588b98c1f46b1382c706adaf398a874e3e')
and SUBSTR(INPUT, 1, 10) in (lower('0x11237ba0'),lower('0xd422b242'))
group by 1,2
order by 1 desc , 2 desc
Last run: about 1 year ago
...
130
4KB
546s