pimi1356-HdnUm3 Kamino Finance: USDH and Other transactions
Updated 2022-10-10
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 alll as (
select date_trunc('{{date_range}}', block_timestamp) as date,
count (distinct tx_id) as TX_Count,
count (distinct signers[0]) as Users_Count
from solana.core.fact_transactions
where succeeded = 'TRUE'
and instructions[0]:programId = '6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc'
group by 1
order by 1),
usdh as (
select date_trunc('{{date_range}}', block_timestamp) as date,
count (distinct tx_id) as TX_Count,
count (distinct signers[0]) as Users_Count
from solana.core.fact_transactions
where (inner_instructions[1]:instructions[0]:parsed:info:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX'
or inner_instructions[0]:instructions[0]:parsed:info:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX'
or pre_token_balances[0]:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX'
or pre_token_balances[1]:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX')
and succeeded = 'TRUE'
and instructions[0]:programId = '6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc'
group by 1
order by 1
)
select 'All transaction' as type, date as datee, TX_Count as TX, Users_Count as users
from alll
UNION
select 'USDH transaction', date,TX_Count, Users_Count
from usdh
Run a query to Download Data