i_danWeek 2 Assignment - 2024-05-04 02:54 PM
Updated 2024-05-04
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
›
⌄
-- WEEK 2 ASSIGNMENT
-- Using the ez_dex_swaps and the ethereum.core.dim_labels table in the Ethereum DeFi Database,
-- Find the names of the top 10 contracts in uniswap by USD amount received.
SELECT
s.block_timestamp,
s.tx_hash,
s.event_name,
s.contract_address,
l.address_name,
l.label,
s.amount_in,
s.symbol_in,
s.amount_in_usd,
s.origin_from_address
FROM
ethereum.defi.ez_dex_swaps s
JOIN
ethereum.core.dim_labels l
ON s.contract_address = l.address
WHERE
platform LIKE 'uniswap-%'
AND
amount_in_usd IS NOT NULL
ORDER BY
amount_in_usd DESC
LIMIT 10
QueryRunArchived: QueryRun has been archived