ValiMohammadiTotal number of users who have used Pactfi and have used Tinyman before or not
    Updated 2022-03-31
    select COUNT(DISTINCT swapper) as NumberOfUser , 'Total number of users who have used Pactfi' as Description FROM algorand.swaps
    where swap_program = 'pactfi'
    UNION
    select COUNT(DISTINCT swapper) as NumberOfUser , 'Total number of users who have used Pactfi and have used Tinyman before' as Description FROM algorand.swaps
    where swap_program = 'pactfi'
    and swapper IN(
    SELECT DISTINCT swapper FROM algorand.swaps
    where swap_program = 'tinyman'
    )
    UNION
    select COUNT(DISTINCT swapper) as NumberOfUser , 'Total number of users who have used Pactfi and have NOT used Tinyman before' as Description FROM algorand.swaps
    where swap_program = 'pactfi'
    and swapper NOT IN(
    SELECT DISTINCT swapper FROM algorand.swaps
    where swap_program = 'tinyman'
    )
    Run a query to Download Data