alitaslimiFees 90 Overview
Updated 2023-03-22
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
prices AS (
SELECT
hour::date AS day,
AVG(price) AS price
FROM
ethereum.core.fact_hourly_token_prices
WHERE
symbol = 'WETH'
GROUP BY
day
),
votes AS (
SELECT
votes.block_timestamp,
votes.proposal_id,
votes.support,
votes.voting_power / POW(10, 18) AS voting_power,
votes.voter,
votes.tx_hash,
transactions.tx_fee,
transactions.tx_fee * prices.price AS tx_fee_usd,
transactions.gas_used
FROM
ethereum.aave.ez_votes votes
JOIN ethereum.core.fact_transactions transactions ON votes.tx_hash = transactions.tx_hash
JOIN prices ON votes.block_timestamp::date = prices.day
WHERE
votes.block_timestamp::date >= CURRENT_DATE - 90
)
SELECT
COUNT(DISTINCT proposal_id) AS "Proposals",
COUNT(DISTINCT tx_hash) AS "Votes",
COUNT(DISTINCT voter) AS "Voters",
SUM(voting_power) AS "Voting Power",
SUM(tx_fee) AS "Fees",
Run a query to Download Data