flyingfishalldata copy
Updated 2023-08-29
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 alldata @ https://flipsidecrypto.xyz/edit/queries/bc14bfb9-4995-42d2-9740-22a6dde35288
-- deposits query_id: 3f0127e3-ee46-4467-a35a-8d4ecf593c87
-- withdrawals query_id: 20e0da07-b1d4-4113-a359-180a7bb577b8
with get_deposits AS (
-- Get data from target query
SELECT
value[0]::date as date
, value[2]::float AS sol_deposit
, value[6]::float AS bsol_minted
, value[9]::numeric AS deposits
FROM (
SELECT
livequery.live.udf_api('https://flipsidecrypto.xyz/api/queries/3f0127e3-ee46-4467-a35a-8d4ecf593c87/latest-run') as response
), lateral FLATTEN (input => response:data:data)
),
get_withdrawals AS (
-- Get data from target query
SELECT
value[0]::date as date
, value[2]::float AS sol_withdrawn
, value[4]::float AS bsol_burned
, value[7]::numeric AS withdrawls
FROM (
SELECT
livequery.live.udf_api('https://flipsidecrypto.xyz/api/queries/20e0da07-b1d4-4113-a359-180a7bb577b8/latest-run') as response
), lateral FLATTEN (input => response:data:data)
),
combined AS (
SELECT
a.date
, a.sol_deposit
, b.sol_withdrawn
, a.bsol_minted
, b.bsol_burned
, a.deposits
Run a query to Download Data