commanderjoseph-761gwXSTOCKS CHECK 3
Updated 2024-12-04
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
›
⌄
WITH
total
AS
(
SELECT
value:Account:: string AS address,
value:Quantity:: int AS total_amount
FROM
(
SELECT
live.udf_api('https://raw.githubusercontent.com/Raymond1944/Optimism-5/refs/heads/main/Stocks%2022.json') as rawoutput
), LATERAL FLATTEN ( input => rawoutput:data)
)
,
total_total
AS
(
SELECT
MAX(block_timestamp) AS last_transaction,
swapper,
total_amount
FROM
solana.defi.ez_dex_swaps
JOIN
total
ON
address = swapper
WHERE
swapper IN (SELECT address FROM total)
GROUP
BY
swapper, total_amount
HAVING
last_transaction > CAST('2024-09-01' AS TIMESTAMP)
ORDER
BY