MotilolaInput Token And Usage Count Of Jared
Updated 2024-10-31
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 txs_raw AS (
SELECT
block_number,
origin_to_address,
contract_address,
pool_name,
symbol_in,
symbol_out,
tx_hash,
platform
FROM ethereum.defi.ez_dex_swaps
WHERE origin_to_address = lower('0x1f2f10d1c40777ae1da742455c65828ff36df387')
),
-- Find blocks with exactly 2 transactions
filtered_blocks AS (
SELECT
block_number,
COUNT(tx_hash) AS tx_count
FROM txs_raw
GROUP BY block_number
HAVING tx_count = 2
),
return_filtered_blocks AS (
SELECT
b.block_number,
r.pool_name,
r.symbol_in,
r.symbol_out,
r.platform
FROM txs_raw r
JOIN filtered_blocks b ON r.block_number = b.block_number
),
-- Count the most used input tokens per platform
QueryRunArchived: QueryRun has been archived