freemartianGNS Impact
    Updated 2022-11-05
    with gns_stats as(
    select
    block_timestamp::date as TIME,
    sum(event_inputs:value/pow(10, 18)) as volume,
    count(distinct tx_hash) as count
    from polygon.core.fact_event_logs
    where contract_address = '0xe5417af564e4bfda1c483642db72007871397896'
    and event_name = 'Transfer'
    and tx_status= 'SUCCESS'
    and block_timestamp > '2022-04-18'
    group by 1
    ),
    total_stats as (
    select
    block_timestamp::date as TIME,
    sum(event_inputs:value/pow(10, 18)) as volume,
    count(distinct tx_hash) as count
    from polygon.core.fact_event_logs
    where contract_address != '0xe5417af564e4bfda1c483642db72007871397896'
    and event_name = 'Transfer'
    and tx_status= 'SUCCESS'
    and block_timestamp > '2022-04-18'
    group by 1
    )
    select a.TIME, (a.count/b.count)*100 as impact_percentage
    from gns_stats a inner join total_stats b on a.TIME = b.TIME




    Run a query to Download Data