freemartianTerminate Vs Increase Count
    Updated 2022-06-28

    select count(tx_hash) as action_count, date_trunc('day', block_timestamp::date) as TIME,
    case
    when ORIGIN_FUNCTION_SIGNATURE = '0xded700a6' then 'Increase Position'
    when ORIGIN_FUNCTION_SIGNATURE = '0x72ada4c5' then 'Terminate Position'
    end as action
    from polygon.core.fact_event_logs
    where origin_to_address = lower('0x059d306A25c4cE8D7437D25743a8B94520536BD5')
    and ORIGIN_FUNCTION_SIGNATURE in ('0xded700a6', '0x72ada4c5')
    and block_timestamp > CURRENT_DATE - 31
    group by action,TIME

    Run a query to Download Data