LI.FIMain-LiFiSpark
Updated 2024-08-19
999
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
›
⌄
-- forked from Main @ https://flipsidecrypto.xyz/edit/queries/886bfe32-77c3-4923-9a2c-710277762a25
-- tx_example on gnosis: 0x10bf2b7c681007b3441b135ec256ea48f2dab42a05063e9260a114d9648f56fb
WITH prices as (
SELECT
hour,
price,
decimals,
symbol,
iff(
is_native,
'0x0000000000000000000000000000000000000000',
token_address
) as token_address,
'ethereum' AS chain
FROM
ethereum.price.ez_prices_hourly
UNION
SELECT
hour,
price,
decimals,
symbol,
iff(
is_native AND (symbol = 'XDAI'),
'0x0000000000000000000000000000000000000000',
token_address
) as token_address,
'gnosis' AS chain
FROM
gnosis.price.ez_prices_hourly
),
ethereum_txns AS (
SELECT
date_trunc('d', a.block_timestamp) AS date,
QueryRunArchived: QueryRun has been archived