CryptoLionsuppliers and assets
Updated 2021-11-10
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
›
⌄
SELECT
supplier,
count(distinct supplied_symbol) as assets
FROM compound.deposits
WHERE block_timestamp >= getdate() - interval '4 months'
GROUP BY supplier
-- SELECT
-- ethereum.transactions.from_address as user,
-- sum(fee_usd) as fee,
-- sum(tx_fee) as tx_fee,
-- count(DISTINCT supplied_symbol) as n_assets
-- FROM ethereum.transactions
-- INNER JOIN compound.deposits on supplier = ethereum.transactions.from_address
-- WHERE
-- ethereum.transactions.from_address in
-- (SELECT supplier
-- FROM compound.deposits)
-- AND ethereum.transactions.block_timestamp = getdate() - interval '7 days'
-- GROUP BY user
-- UNION
-- SELECT
-- ethereum.transactions.to_address as user,
-- sum(fee_usd) as fee,
-- sum(tx_fee) as tx_fee,
-- count(DISTINCT supplied_symbol) as n_assets
-- FROM ethereum.transactions
-- INNER JOIN compound.deposits on supplier = ethereum.transactions.to_address
-- WHERE
-- ethereum.transactions.to_address in
-- (SELECT supplier
-- FROM compound.deposits)
-- AND ethereum.transactions.block_timestamp = getdate() - interval '7 days'
-- GROUP BY user
Run a query to Download Data