hbd1994Monthly Average FLOW Balance of Wallets
Updated 2022-11-29Copy Reference Fork
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 withdraw as
(
with maintable as (
select
a.BLOCK_TIMESTAMP,
a.TX_ID,
b.Authorizers[0]::string,
b.PAYER,
a.EVENT_DATA:amount as amount,
a.EVENT_DATA:from::string as "User"
from flow.core.fact_events a
join flow.core.fact_transactions b on a.tx_id = b.tx_id
where a.EVENT_CONTRACT = 'A.1654653399040a61.FlowToken'
and a.EVENT_TYPE = 'TokensWithdrawn'
and a.TX_SUCCEEDED = true)
select
date_trunc('month',block_timestamp::date) as "Date",
"User",
count(distinct TX_ID) as "Number of Withdrawal Transactions",
count(*) as "Number of Withdrawal Events",
sum(amount) as "Withdrawals Volume"
from maintable
group by 1,2),
deposit as
(
with maintable as (
select
a.BLOCK_TIMESTAMP,
a.TX_ID,
b.Authorizers[0]::string,
b.PAYER,
a.EVENT_DATA:amount as amount,
a.EVENT_DATA:to::string as "User"
from flow.core.fact_events a
Run a query to Download Data