Sandeshuser types trading
Updated 2024-10-10
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 user types trading @ https://flipsidecrypto.xyz/edit/queries/a7055a50-b477-4b15-9b73-4de49344a237
with changes as
(
with dates as
(
select date_trunc('day',BLOCK_TIMESTAMP) as date from ethereum.core.fact_transactions
where date>='2023-04-06 00:00:00.000'
and date <= current_date
group by 1
),
buy_sell_table as
((
select
date_trunc('day',BLOCK_TIMESTAMP) as date,
nft_to_address as address ,
1 as amount
from ethereum.nft.ez_nft_transfers
where block_number>='16985982'
and nft_address=lower('0x1B41d54B3F8de13d58102c50D7431Fd6Aa1a2c48')
-- and nft_to_address='0x5221251f4494dc0a3a1e25359be0528a858afed9'
)
union all
(
select
date_trunc('day',BLOCK_TIMESTAMP) as date,
nft_from_address as address,
-1 as amount
from ethereum.nft.ez_nft_transfers
where block_number>='16985982'
and nft_address=lower('0x1B41d54B3F8de13d58102c50D7431Fd6Aa1a2c48')
-- and nft_from_address='0x5221251f4494dc0a3a1e25359be0528a858afed9'
)
QueryRunArchived: QueryRun has been archived