freemartianFT Fork 3
    Updated 2024-01-29
    -- forked from FT add @ https://flipsidecrypto.xyz/edit/queries/0ecb5c7c-3474-432d-8d1d-b35ff9aa1413

    -- forked from Ario / friend tech stats 1 @ https://flipsidecrypto.xyz/Ario/q/c2YZrMSjXr05/friend-tech-stats-1

    select
    user,
    sum(fee),
    Action
    from
    (
    select
    from_address as user,
    sum(ETH_VALUE)/10 as Fee,
    'Buy' as Action
    -- 'Fee Paid to FT & Key owner' as Buy_Fee
    from
    base.core.fact_traces b
    where
    (
    LOWER(TYPE) NOT IN ('delegatecall', 'callcode', 'staticcall')
    or TYPE is null
    )
    AND TX_STATUS = 'SUCCESS'
    AND TO_ADDRESS = '0xcf205808ed36593aa40a44f10c7f7c2f67d4a4d4'
    group by
    1
    union
    all
    select
    to_address as user,
    sum(ETH_VALUE)/10 as Fee,
    'Sell' as Action
    --'Fee Paid to FT & Key owner' as Sell_Fee
    from
    base.core.fact_traces b
    where
    Last run: about 1 year agoAuto-refreshes every 3 hours
    USER
    SUM(FEE)
    ACTION
    1
    0x4e119284fdc705dfd0e747d9cb8757ca338afe610.387413125Buy
    2
    0x4e119284fdc705dfd0e747d9cb8757ca338afe610.5621378125Sell
    2
    133B
    15s