KaskoazulUntitled Query
    Updated 2022-02-07
    --with
    --firsttable as (
    -- select 'provide' as type, 1 as value
    -- union select 'provide' as type, 2 as value
    -- union select 'provide' as type, 3 as value
    --),
    --secondtable as (
    --select 'withdraw' as type, 4 as value
    -- union select 'withdraw' as type, 5 as value
    -- union select 'withdraw' as type, 6 as value
    -- union select 'withdraw' as type, 7 as value
    --),
    --final as (
    --select type, value from firsttable
    --union all
    --select type, value from secondtable
    --)
    --select * from final


    SELECT
    Animals,
    COUNT(ANIMALS)
    FROM (
    SELECT
    case
    WHEN (amount > 0 AND amount <= 1000) then 'MOUSE'
    WHEN (amount > 1000 AND amount <=10000) THEN 'CAT'
    WHEN (amount > 10000 AND amount <=100000) THEN 'DOG'
    WHEN (amount > 100000 AND amount <= 1000000) THEN 'HORSE'
    WHEN (amount > 1000000 AND amount <= 10000000) THEN 'ELEPHANT'
    ELSE 'DINOSAUR'
    END as ANIMALS
    FROM algorand.account_asset
    WHERE
    Run a query to Download Data