winnie-fsparam test copy
Updated 2023-12-13
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
›
⌄
-- forked from param test @ https://flipsidecrypto.xyz/edit/queries/a90fbaaa-af91-4912-9e20-dd17b9c4bd3e
with
fix_parameter as (
select
case
when '{{Days}}' = 'Last 30 Days' then 30
when '{{Days}}' = 'Last 60 Days' then 60
when '{{Days}}' = 'Last 90 Days' then 90
when '{{Days}}' = 'Last 180 Days' then 180
when '{{Days}}' = 'Last 365 Days' then 365
when '{{Days}}' = 'All Time' then 2000
else 30
end as time_frame
),
near_contract_address as (
select distinct
address
from
near.core.dim_address_labels
),
user_interacted_with_aurora_transactions as (
select
tx_hash,
block_timestamp,
tx_signer,
transaction_fee * pow(10, -24) as fee
from
near.core.fact_transactions
where
tx_status = 'Success'
and tx_receiver in ('aurora')
and tx_signer not in ('aurora')
and tx_signer not ilike '%.aurora'
and tx_signer not in (
select
QueryRunArchived: QueryRun has been archived