raho2023-09-06 06:17 PM
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 all_prot AS (
SELECT
chain,
chains,
description,
protocol,
protocol_id
FROM external.defillama.dim_protocols
),
count_prot AS (
SELECT
chain,
count(protocol) AS num_protocols
FROM all_prot
GROUP BY 1
),
filt_prot AS (
SELECT
*
FROM count_prot
WHERE num_protocols >= 7
),
all_tvl AS (
SELECT
date,
chain,
tvl_usd
FROM external.defillama.fact_chain_tvl
WHERE date = CURRENT_DATE()
and tvl_usd > 10000000
AND tvl_usd < 100000000
)
Run a query to Download Data