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