StangFAST001 - base [ ez_events_decoded ]
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 001 - base @ https://flipsidecrypto.xyz/edit/queries/7d8ab761-6254-409f-ab76-0720da721979
--- Liquidity Pool
--- withdraw
--- UpdateFeesAndRewards , CollectFees , DecreaseLiquidity
--- deposit
--- IncreaseLiquidity , OpenPositionWithMetadata
--- Swap
--- Swap
with
--- price
tab1 AS
(
SELECT
date_trunc( 'day' , a.recorded_hour ) AS date
, avg( a.close ) AS price
, a.token_name AS token
FROM
solana.price.ez_token_prices_hourly a
WHERE
a.token_address = '5MAYDfq5yxtudAhtfyuMBuHZjgAbaS9tbEyEQYAhDS5y'
GROUP BY 1 , 3
ORDER BY 1 DESC
)
SELECT
a.block_timestamp::date AS dt
, a.signers[0] AS sg
, a.tx_id AS tx
, a.event_type AS ac
, b.amount * c.price AS am
, b.tx_from AS tf
, b.tx_to AS tt
FROM
Run a query to Download Data