SocioCryptostatistics
Updated 2022-07-29Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with base as (
SELECT *, rank() over (partition BY origin_from_address ORDER BY block_timestamp) as rank
FROM ethereum.core.fact_event_logs
WHERE block_timestamp::date >= '2022-06-01'
)
SELECT
count(DISTINCT a.tx_hash) as n_txn,
avg(datediff(hour,a.block_timestamp, b.block_timestamp)),
count(DISTINCT a.origin_from_address)
FROM base a, base b
WHERE a.origin_from_address = b.origin_from_address AND a.rank+1=b.rank
AND a.origin_to_address = '0xb4bd4628e6efb0cb521d9ec35050c75840320374' AND a.contract_address = '0xb4bd4628e6efb0cb521d9ec35050c75840320374'
AND a.event_name = 'Approval'
AND a.origin_function_signature = '0x095ea7b3'
Run a query to Download Data