mucrypto2023-09-18 07:21 PM
999
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 resps as
(select defillama.get('/protocols', {}) as resp)
select * from resps
select
address_name,
split(address_name, ' ') as total_array,
array_size(total_array) as length_array,
total_array[length_array-1] as pool_name
from ethereum.core.dim_labels
where address_name like 'cvx-eth%'
select
address_name
from ethereum.core.dim_labels
where address_name like 'cvx-eth%'
limit 10
partial_list as (select
value:category::string as category,
value:name::string as name,
value:tvl as tvl
from resps,
lateral flatten (input => resp:data)
where category = 'Dexes'
-- and name not in ('AAVE V1', 'AAVE V2','AAVE V3','Aave Arc', 'Compound', 'Compound V3'
-- ,'Morpho Aave','Morpho AaveV3','Morpho Compound', 'Venus', 'Venus Isolated Pools',
-- 'Radiant V1', 'Radiant V2')
and tvl != 0),
venus as (
select
value:category::string as category,
value:name::string as project_name,
Run a query to Download Data