HosseinUntitled Query
Updated 2022-12-05
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 prices as (
select
recorded_hour::date as day,
case symbol
when 'SOL' then 'So11111111111111111111111111111111111111112'
when 'USDC' then 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
when 'MSOL' then 'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So'
when 'WETH' then '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs'
when 'SCNSOL' then '5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm'
when 'MNGO' then 'MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac'
when 'FTR' then 'HEhMLvpSdPviukafKwVN8BnBUTamirptsQ6Wxo5Cyv8s'
when 'USDT' then 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
when 'RLB' then 'RLBxxFkseAZ4RgJH3Sqn8jXxhmGoz9jWxDNJMh8pL7a'
when 'ARB' then '9tzZzEHsKnwFL1A3DyFJwj36KnZj3gZ7g4srWp9YTEoh'
when 'XLFNTY' then 'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu'
when 'PRT' then 'PRT88RkA4Kg5z7pKnezeNH4mafTvtQdfFgpQTGRjz44'
when 'RAY' then '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R'
when 'PRISM' then 'PRSMNsEPqhGVCH1TtWiJqPjJyh2cKrLostPZTNy1o5x'
when 'FOXY' then 'FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq'
when 'DFX' then '2eM42xWpfCq3co6B2AUWcUqr8YC551e38wn78sw7ZxoP'
when 'SWIM' then 'EqDta8P59L9iFW1NWXyDwMWGdn91iNfuEgSUxvrL1iAs'
when 'MEE' then 'GwYtsLjYy8SwMt6RYhYAA2KZfLvuCmWfq3MfhmNqLNfe'
when 'UNIQO' then '9Rt62nK2RMjirSwXw2giHQwzg6NTkrARSrHHE1fGTmAk'
when 'SAPE' then '64Hw4Hm4WLC1Ty6p8g5vLZNCS37msb9Qq8ZFJE6UConN'
when 'WBTC' then '9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E'
when 'NEAR' then 'BYPsjxa3YuZESQz1dKuBw1QSFCSpecsm8nCQhY5xbU1Z'
end as mint, symbol,
avg(close) as price_usd
from solana.core.fact_token_prices_hourly
group by 1, 2, 3
)
select
prices.symbol,
count(distinct a.tx_id) "Swaps Count",
count(distinct tx_from) "Swappers Count",
Run a query to Download Data