HadisehWorld Cup 5
    Updated 2022-12-06
    with t1 as ( select date(block_timestamp) as date,
    'Fifa' as project_name,
    tx_group_id as tx,
    nft_asset_id as nft
    from algorand.nft.ez_nft_sales_fifa
    where sale_type = 'mint'
    UNION
    select trunc(a.block_timestamp,'day') as date,
    'AllDay' as project_name,
    a.tx_id as tx,
    event_data:id as nft
    from flow.core.fact_events a join flow.core.fact_transactions b on a.tx_id = b.tx_id
    where event_contract ilike '%allday%'
    and event_type ilike '%NFTMinted%'
    UNION
    select trunc(a.block_timestamp,'day') as date,
    'TopShot' as project_name,
    a.tx_id as tx,
    event_data:momentID as nft
    from flow.core.fact_events a join flow.core.fact_transactions b on a.tx_id = b.tx_id
    where event_contract ilike '%topshot%'
    and event_type ilike '%MomentMinted%'
    UNION
    select trunc(a.block_timestamp,'day') as date,
    'Laliga Golazos' as project_name,
    a.tx_id as tx,
    event_data:id as nft
    from flow.core.fact_events a join flow.core.fact_transactions b on a.tx_id = b.tx_id
    where event_contract = 'A.87ca73a41bb50ad5.Golazos'
    and event_type ilike '%NFTMinted%'
    ),
    final_result as ( select date,
    project_name,
    count(DISTINCT tx) as total_transaction,
    count(DISTINCT nft) as total_nft,
    rank() over (partition by project_name order by date) as rank
    Run a query to Download Data