boomer77gp sales only
Updated 2021-10-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
with gp as (select date_trunc('day', block_timestamp) as tx_date, count (distinct tx_id) as tx_count,
sum(msg_value:execute_msg:execute_order:order:order:taker_asset:amount/1e6) as volume_luna
from terra.msgs
where msg_value:execute_msg:execute_order:order:order:maker_asset:info:nft:contract_addr::string = 'terra103z9cnqm8psy0nyxqtugg6m7xnwvlkqdzm4s4k'
and msg_value:execute_msg:execute_order:order:order:maker_asset:info:nft:token_id::string is not null and tx_status = 'SUCCEEDED'
group by 1),
price as (select avg(price_usd) as luna, date_trunc('day', block_timestamp) as dt
from terra.oracle_prices
where symbol = 'LUNA'
group by 2)
select a.tx_date, a.tx_count, a.volume_luna, b.luna, (a.volume_luna * b.luna) as volume_usd
from gp a
join price b on a.tx_date = b.dt
Run a query to Download Data