rajs# of Users by Tx Type
Updated 2022-09-14Copy 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
›
⌄
SELECT
tx_type,
case when tx_type = 1 then 'Buy Only'
when tx_type = 2 then 'Sell Only'
when tx_type = 3 then 'Both Buy and Sell'
end as tx,
count(user) as no_of_users
FROM
(
SELECT
user,
sum(identifier) as tx_type,
sum(no_of_txs) as no_of_txs
from
(
SELECT
buyer as user,
1 as identifier,
count(*) as no_of_txs
from flow.core.ez_nft_sales
where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
group by 1
UNION
SELECT
seller as user,
2 as identifier,
count(*) as no_of_txs
from flow.core.ez_nft_sales
where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
group by 1
)
group by 1
order by 3 desc
)
Run a query to Download Data