m0rt3zaMISO - Ethereum popular auction types last 3 months
Updated 2022-09-19Copy 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
›
⌄
WITH markets AS (
SELECT
origin_from_address as creator,
event_inputs:addr as market_address,
event_inputs:marketTemplate as market_template,
CASE
WHEN market_template = '0x1c5771e96c9d5524fb6e606f5b356d08c40eb194' THEN 'Dutch Auction'
WHEN market_template = '0xf60e5f4a44a510742457d8064ffd360b12d8d9af' THEN 'Crowdsale'
WHEN market_template = '0x258f7e97149afd7d7f84fa63b10e4a3f0c38b788' THEN 'Batch Auction'
END as market_type
FROM ethereum.core.fact_event_logs
WHERE origin_to_address = '0x7603a35af5cf10b113f167d424eb75bb7062c8ce'
AND event_name = 'MarketCreated'
), txs AS (
SELECT
b.block_timestamp,
b.from_address as user,
b.tx_hash,
a.*
FROM markets as a JOIN ethereum.core.fact_transactions as b on a.market_address = b.to_address
)
SELECT
market_type,
count(DISTINCT user) as "User Count"
FROM txs
WHERE block_timestamp > CURRENT_DATE - 90
GROUP BY market_type
Run a query to Download Data