Skip to content
Dune Analytics

@p0s / Aave rev sharing deposit

SQL query results

Loading
 

SQL query

1SELECT symbol, sum(_amount/(10^t.decimals)*{{ referral_factor }}) as total
2FROM aave."LendingPool_evt_Deposit" a
3LEFT JOIN erc20."tokens" t ON "_reserve" = t.contract_address
4--WHERE evt_block_time BETWEEN '06/01/20 00:00:01' AND '06/30/20 23:59'
5--WHERE month(evt_block_time) = '6'
6WHERE evt_block_time < '05/26/20 00:00:01'
7 AND _referral = {{ Referral }}
8GROUP BY symbol
9ORDER BY 2 desc