with nfts_contract as (
select address, project_name
from polygon.core.dim_labels
where project_name ilike '%nft%' or project_name ilike '%opensea%'
),
txs as (
select tx_hash as tx
from polygon.core.fact_event_logs, nfts_contract
where address = contract_address
)
select sum(matic_value) as volume
from polygon.core.fact_transactions, txs
where tx_hash = tx