barbodNew Users Interactions with Prism Protocol
Updated 2022-03-09
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
›
⌄
WITH
wallets AS (
SELECT
tx_from[0] AS wallet,
MIN(block_timestamp)::date AS min_date
FROM terra.transactions
GROUP BY wallet
HAVING min_date >= CURRENT_DATE-90
),
tx_id AS (
SELECT DISTINCT tx_id
FROM terra.transactions
WHERE tx_from[0] IN (SELECT wallet FROM wallets)
)
SELECT
date(block_timestamp) AS date,
COUNT(DISTINCT tx_id) tx_count,
COUNT(DISTINCT msg_value:sender) AS address_count
FROM terra.msgs
WHERE
tx_status = 'SUCCEEDED'
AND msg_value:contract::string = 'terra1dh9478k2qvqhqeajhn75a2a7dsnf74y5ukregw' --Prism
AND msg_value:execute_msg:send:amount IS NOT NULL
AND msg_value:execute_msg:send:amount/1e6 > 0
AND tx_id IN (SELECT tx_id FROM tx_id)
GROUP BY date
HAVING tx_count >= 5
ORDER BY date
Run a query to Download Data