-- forked from Motilola / Early Supporters Addresses (10months After Launch) @ https://flipsidecrypto.xyz/Motilola/q/3uVtSrYGH5Bj/early-supporters-addresses-10months-after-launch
WITH early_supporters AS (
SELECT
DISTINCT purchaser AS user_address,
sales_amount
FROM
solana.nft.fact_nft_sales
WHERE
block_timestamp :: date BETWEEN '2021-09-01'AND '2022-06-30' ---10 months after magic eden launched
AND marketplace ILIKE '%magic eden%'
AND user_address = '{{wallet_address}}'
)
SELECT
user_address AS early_supporters_wallet_address,
SUM(sales_amount) AS amount_spent_in_sol
FROM
early_supporters
GROUP BY all