rezarwzLiveQuery: Using Dune query in Flipside copy
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
-- forked from piper / LiveQuery: Using Dune query in Flipside @ https://flipsidecrypto.xyz/piper/q/_3rFdr4woORO/livequery-using-dune-query-in-flipside
with dune_data AS (
SELECT live.udf_api(
'https://api.dune.com/api/v1/query/2946766/results?api_key=[dune_api_key]'
-- [dune_key] is defined in Secrets Manager https://flipsidecrypto.xyz/secrets
--'https://api.dune.com/api/v1/query/2946766/results', 'api_key': '[dune]'
) as response
),
flatten_dune_data AS (
SELECT
*
FROM dune_data, table(flatten(response, '')))
SELECT *
FROM flatten_dune_data
ORDER BY 1 DESC
Run a query to Download Data