SniperTotal amount in BTC
    Updated 2023-09-04
    select
    'Deposit' as type,
    count(DISTINCT(TX_ID)) as total_tx,
    sum(VALUE) as amount,
    avg(VALUE) as avg_amount
    from
    bitcoin.core.fact_outputs
    where
    PUBKEY_SCRIPT_ADDRESS = 'bc1qw8wrek2m7nlqldll66ajnwr9mh64syvkt67zlu'
    group by 1
    UNION
    select
    'Withdraw' as type,
    count(DISTINCT(TX_ID)) as total_tx,
    sum(VALUE) as amount,
    avg(VALUE) as avg_amount
    from
    bitcoin.core.fact_inputs
    where
    PUBKEY_SCRIPT_ADDRESS = 'bc1qw8wrek2m7nlqldll66ajnwr9mh64syvkt67zlu'
    group by 1
    Run a query to Download Data