purifDaily actions
Updated 2025-02-13
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
›
⌄
--unique users
--clicks and other actions per day
--new and returning users
with daily_clicks as (
select date_trunc('day',block_timestamp) as day, count(distinct ORIGIN_FROM_ADDRESS) as clicker, count(*) as clicks from berachain.testnet.fact_event_logs
where contract_address=lower('0x5aD441790c3114e0AB27816abdB0c9693cd96399')
and topics[0]='0x92e508e7313b5df8d1fe99a3a6068ca07acf2a63f5c2ef3b765272189ad6fcf7'
group by 1
),
daily_bullas_minted as (
select date_trunc('day',block_timestamp) as day, count(distinct ORIGIN_FROM_ADDRESS) as minter, count(tx_hash) as minted from berachain.testnet.fact_event_logs
where contract_address=lower('0x6679732D6C09c56faB4cBf589E01F5e41A2d9e67')
and topics[0]='0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
and concat('0x',substr(TOPICS[1], 27,64))=lower('0x0000000000000000000000000000000000000000')
group by 1
),
daily_tools_purchased as (
select date_trunc('day',block_timestamp) as day, count(distinct ORIGIN_FROM_ADDRESS) as tool_purchaser, count(distinct tx_hash) as tools_tx from berachain.testnet.fact_event_logs
where contract_address=lower('0x12cF1dC4A8d66187202511a706E90Dfb7BE8a80C')
and topics[0]='0x2e560384f63cf755b18d6a38b592e77c9e8a470568c8af4af2af691b8e293cb0'
group by 1
),
daily_tools_upgrade as (
select date_trunc('day',block_timestamp) as day, count(distinct ORIGIN_FROM_ADDRESS) as tool_upgrader, count(distinct tx_hash) as upgrade_tx from berachain.testnet.fact_event_logs
where contract_address=lower('0x12cF1dC4A8d66187202511a706E90Dfb7BE8a80C')
and topics[0]='0x66c31914e3bd746ce9bc52137a7e373dbb13b19e5f2757b43a0fcef5efb6a136'
group by 1
),
daily_moola_claim as (
select date_trunc('day',block_timestamp) as day, count(distinct ORIGIN_FROM_ADDRESS) as claimer, count(distinct tx_hash) as moola_claim_tx, sum((utils.udf_hex_to_int(substr(data,3,66))::int)/1e18) as moola_amount from berachain.testnet.fact_event_logs
where contract_address=lower('0x12cF1dC4A8d66187202511a706E90Dfb7BE8a80C')
and topics[0]='0x605b595afe3f24ee3279d95d1a215a6d91dd3884ab9f247d3c5487434d5374dc'
group by 1
)
select *,
QueryRunArchived: QueryRun has been archived