Query editor
/*https://docs.cloud.debank.com/en/readme/api-pro-reference/protocolhttps://docs.cloud.debank.com/en/readme/api-pro-reference/user*/WITH ETHx_TVS AS(SELECTCAST(x.date AS TIMESTAMP) AS dt,1 AS chain_id,'ethereum' AS blockchain,0xA35b1B31Ce002FBF2058D22F30f95D405200A15b AS contract_address,'integration' AS product,'rated' AS protocol,'ETHx' AS symbol,x.tvl_usd AS usd_value--https://dune.com/queries/2828937/4720928FROM query_2828937 x --@stader_labs / ETHx MetricsWHERE x.date >= CAST('2023-10-17 00:00' AS TIMESTAMP) --Start date for DeBank Data Collection),oSnap_TVS AS(SELECTCAST(dt AS TIMESTAMP) AS dt,chain_id,blockchain,wallet AS contract_address,'osnap' AS product,protocol,'' AS symbol,usd_value--https://dune.com/queries/3097256FROM query_3097256 --@risk_labs / DeBank oSnap TVS by DateWHERE CAST(dt AS TIMESTAMP) >= CAST('2023-10-17 00:00' AS TIMESTAMP) --Start date for DeBank Data Collection),combined AS(--Stader ETHx Secured by Rated Which used UMA OOSELECT * FROM ETHx_TVS--UMA oSnap Secured by UMA OOUNION SELECT * FROM oSnap_TVS--DeBank TVL Method:UNION SELECTCAST(dt AS TIMESTAMP) AS dt,chain_id,blockchain,wallet AS contract_address,t.type AS product,CASE--Integrations:WHEN LOWER(CAST(wallet AS VARCHAR)) IN (LOWER('0xc186fa914353c44b2e33ebe05f21846f1048beda')) THEN 'across'WHEN LOWER(CAST(wallet AS VARCHAR)) IN (LOWER('0x4d97dcd97ec945f40cf65f87097ace5ea0476045'),LOWER('0x3A3BD7bb9528E159577F7C2e685CC81A765002E2')) THEN 'polymarket'WHEN LOWER(CAST(wallet AS VARCHAR)) IN (LOWER('0xdebe19b57e8b7eb6ea6ebea67b12153e011e6447')) THEN 'cozy'WHEN LOWER(CAST(wallet AS VARCHAR)) IN (LOWER('0x0865a889183039689034dA55c1Fd12aF5083eabF')) THEN 'sherlock'WHEN blockchain = 'arbitrum' AND t.type = 'integration' AND symbol = 'FORE' THEN 'fore_protocol'WHEN blockchain = 'ethereum' AND t.type = 'integration' AND name = 'Index Coop' THEN 'index_coop'WHEN blockchain = 'ethereum' AND t.type = 'integration' AND name = 'Y2K Finance' THEN 'y2k_finance'WHEN blockchain = 'blast' AND LOWER(CAST(wallet AS VARCHAR)) IN (