Popex404#2 Squid Competitive Analysis - Total Transactions
Updated 2023-04-22
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
›
⌄
-- forked from #1 Squid Competitive Analysis - Daily Transactions @ https://flipsidecrypto.xyz/edit/queries/d1fdabbe-918f-4898-aacb-58002ba15146
With
-- Courtesy From https://flipsidecrypto.xyz/0xHaM-d/q/li-fi-YLbqqT
Hop_Info as (
SELECT
block_timestamp,
tx_hash,
origin_from_address,
c.symbol as token_symbol,
CASE WHEN contract_address in
(lower('0xdAC17F958D2ee523a2206206994597C13D831ec7'),lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6'),
lower('0x9F93ACA246F457916E49Ec923B8ed099e313f763'),lower('0x6c9a1ACF73bd85463A46B0AFc076FBdf602b690B'),
lower('0x9ec9551d4A1a1593b0ee8124D98590CC71b3B09D'),lower('0x25D8039bB044dC227f741a9e381CA4cEAE2E6aE8'))
then raw_amount/1e6 else raw_amount/1e18 end as token_Amount
FROM polygon.core.fact_token_transfers t
left outer JOIN polygon.core.dim_contracts c on t.contract_address = c.address
WHERE t.contract_address in (
lower('0xdAC17F958D2ee523a2206206994597C13D831ec7'),lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6'), -- polygon, 'USDT'
lower('0x9F93ACA246F457916E49Ec923B8ed099e313f763'),lower('0x6c9a1ACF73bd85463A46B0AFc076FBdf602b690B'), -- polygon, 'USDT'
lower('0x712F0cf37Bdb8299D0666727F73a5cAbA7c1c24c'),lower('0x553bC791D746767166fA3888432038193cEED5E2'), -- polygon, 'MATIC
lower('0xb8901acB165ed027E32754E0FFe830802919727f'),lower('0xEcf268Be00308980B5b3fcd0975D47C4C8e1382a'), -- polygon, 'DAI',
lower('0x1fDeAF938267ca43388eD1FdB879eaF91e920c7A'),lower('0xb98454270065A31D71Bf635F6F7Ee6A518dFb849'), -- polygon, 'WETH'
lower('0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC'),lower('0x58c61AeE5eD3D748a1467085ED2650B697A66234'), -- polygon, 'HOP',
lower('0x9ec9551d4A1a1593b0ee8124D98590CC71b3B09D'),lower('0x25D8039bB044dC227f741a9e381CA4cEAE2E6aE8') -- polygon, 'USDC'
)
AND block_timestamp >= '2023-03-01'
UNION ALL
SELECT
block_timestamp,
tx_hash,
origin_from_address,
c.symbol as token_symbol,
CASE WHEN contract_address in
(lower('0x2057C8ECB70Afd7Bee667d76B4CD373A325b1a20'),lower('0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61'),
Run a query to Download Data