SocioAnalyticaGMP and Transfers over time
Updated 2024-10-20
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
›
⌄
-- forked from SocioCrypto / GMP and Transfers over time @ https://flipsidecrypto.xyz/SocioCrypto/q/SmurgIuyOCls/gmp-and-transfers-over-time
SELECT * ,
sum(n_txs) over (partition by platform ORDER BY date) as cum_txs
FROM (
SELECT 'GMP' as type,
platform,
date_trunc('{{interval}}',block_timestamp) as date,
count(DISTINCT tx_id) as n_txs
FROM (
SELECT 'squid' as platform,
tx_id,
block_timestamp
FROM axelar.core.fact_msg_attributes
WHERE ATTRIBUTE_VALUE = 'Event_ContractCallWithToken'
UNION
SELECT 'other[MintDAO Bridge | Prime Protocol | etc]' as platform,
tx_id,
block_timestamp
FROM axelar.core.fact_msg_attributes a
WHERE ATTRIBUTE_VALUE = 'Event_ContractCall'
)
GROUP BY date , platform
UNION
SELECT
'TRANSFERS' as type,
'satellite' as platform,
date_trunc('{{interval}}',block_timestamp) as date,
count(DISTINCT tx_hash) as n_txs
FROM axelar.defi.ez_bridge_satellite
GROUP BY date
)
ORDER BY date DESC , platform
QueryRunArchived: QueryRun has been archived