adeyemi2023-05-17 07:51 PM
Updated 2023-05-24
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
›
--SELECT
-- *
--FROM
-- ethereum.core.fact_event_logs
--WHERE
-- block_timestamp >= CURRENT_DATE -6
-- AND contract_address = LOWER('0x397ff1542f962076d0bfe58ea045ffa2d347aca0')
-- AND topics ilike '%"0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822"%'
--SELECT
--sum(amount_in_usd) as Amount_in_USD, count(amount_in) as Count_of_Swap
--FROM
--ethereum.CORE.EZ_DEX_SWAPS
--WHERE
--block_timestamp >= current_Date - 6
--AND contract_address = LOWER('0x397ff1542f962076d0bfe58ea045ffa2d347aca0') -- USDC/ETH ON SUSHI NETWORK
--AND event_name in ('Swap')
--AND token_in in ('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48') --filtering for all swap that happend with USDC in
--ORDER BY
--block_timestamp DESC
--SELECT
--sum(amount_in_usd) as Amount_in_USD,
--count(amount_in) as Count_of_Swap
--FROM
--ethereum.CORE.EZ_DEX_SWAPS
--WHERE
--block_timestamp >= current_Date - 6
--AND contract_address IN (LOWER('0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640'), LOWER('0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc')) -- this is the pool address for USDC/WETH ON UNISWAP V3 and V2
--AND event_name in ('Swap')
--AND symbol_in = 'USDC'
-- curve, synthetix, balancer, dodo, frax,
--hashflow,
--SELECT
-- sum(amount_in_usd) as Amount_in_USD,
-- count(amount_in) as Count_of_Swap
--FROM
Run a query to Download Data