Moesquid comp 3 copy
Updated 2024-07-06
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
›
⌄
with
squid as (
SELECT
block_timestamp,tx_hash,
source_chain,sender,destination_chain,
token_symbol,amount
from axelar.defi.ez_bridge_squid
),
total as (
select 'Squid' as bridge, * from squid
),
prices as (
select
trunc(recorded_hour,'day') as day,
symbol,
avg(price) as price_usd
from osmosis.price.ez_prices
group by 1,2
),
final_squid as (
SELECT
distinct sender as user,
bridge,
min(trunc(block_timestamp,'{{granularity}}')) as date
from total x
join prices y on trunc(x.block_timestamp,'day')=y.day
and token_symbol=symbol
where amount*price_usd<1e6
group by 1,2
),
debut as (
select min(block_timestamp) as debut
from axelar.defi.ez_bridge_squid
),
satellite as (
SELECT
QueryRunArchived: QueryRun has been archived