SELECT
count(DISTINCT tx_hash) as events,
count(DISTINCT borrower) as users,
sum(AMOUNT_LOANED * price) as volume
FROM ethereum.maker.ez_flash_loans
LEFT outer JOIN ethereum.core.fact_hourly_token_prices
ON hour = date_trunc('week', block_timestamp)
AND ethereum.maker.ez_flash_loans.symbol = ethereum.core.fact_hourly_token_prices.symbol
WHERE block_timestamp > '2021-01-01'