-- Get distribution of users by blockchain
SELECT date_trunc('week', block_timestamp) AS date,
blockchain,
COUNT(DISTINCT from_address) AS user_count
FROM
thorchain.defi.fact_swaps
WHERE
block_timestamp >= '2024-01-01'
GROUP BY
date, blockchain
ORDER BY
user_count DESC;