SalehNot Your Keys-The destination of chains-daily
Updated 2022-11-18
999
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
›
⌄
-- dear jacktheguy
-- Credit: https://app.flipsidecrypto.com/velocity/queries/bb56d191-232c-421b-99ff-93e4d1311ce1
with txtable as (
select
tx_id
,ATTRIBUTE_VALUE as chain
from axelar.core.fact_msg_attributes
where ATTRIBUTE_KEY = 'destinationChain'
and block_timestamp::date >= CURRENT_DATE - 30)
,usertable as (
select
ATTRIBUTE_VALUE as User
,tx_id
from axelar.core.fact_msg_attributes
where tx_id in (select tx_id from txtable)
and ATTRIBUTE_KEY = 'spender'),
maintable1 as (
select distinct user,
date_trunc(day,block_timestamp) as date
,t1.tx_id
,chain
,t1.ATTRIBUTE_VALUE
from axelar.core.fact_msg_attributes t1 join txtable t2 on t1.tx_id = t2.tx_id
join usertable t3 on t1.tx_id = t3.tx_id
where MSG_TYPE = 'coin_spent'
and ATTRIBUTE_INDEX = 1)
,labeltable as (
select
date
,attribute_value
,tx_id
,user
,chain
Run a query to Download Data