Deebs-DeFi-j9fRbzANY ASSET THORCHAIN Who is Buying Custom Other Month copy copy
    Updated 2023-11-12
    -- forked from ANY ASSET THORCHAIN Who is Buying Custom Other Month copy @ https://flipsidecrypto.xyz/edit/queries/3aa1b9d0-5cd5-45e3-a548-fc7c55d9244c

    -- forked from RUNE Who is Buying Custom Other Month @ https://flipsidecrypto.xyz/edit/queries/736a5250-bc98-4760-9e58-706df15e931e

    -- forked from RUNE Who is Buying Custom @ https://flipsidecrypto.xyz/edit/queries/6c53d3f0-f8ce-4c8d-9e98-df6d5b5e605a

    -- forked from KUJIRA Who is Buying Custom @ https://flipsidecrypto.xyz/edit/queries/0741a838-1e6e-4047-bf69-aa337bdaaec8

    -- forked from KUJIRA Who is Buying @ https://flipsidecrypto.xyz/edit/queries/64d47120-94e6-429c-83a9-d8323a713142

    -- forked from KUJI Weekly WHALEs @ https://flipsidecrypto.xyz/edit/queries/f2b08602-84e0-4d45-a6e7-01bcae8d5def


    SELECT
    date_trunc('day',BLOCK_TIMESTAMP) as Date,
    sum(TO_AMOUNT_USD) AS Swapped_Value_USD,
    CASE
    When Blockchain='ETH' Then 'Ethereum'
    When Blockchain='BTC' Then 'Bitcoin'
    When Blockchain='AVAX' Then 'Avalanche'
    When Blockchain='THOR' Then 'Thorchain'
    When Blockchain='DOGE' Then 'Doge'
    Else Blockchain
    End As Chain
    from thorchain.defi.fact_swaps
    WHERE BLOCK_TIMESTAMP BETWEEN {{start_date}} AND {{end_date}}
    GROUP BY 1,3




    /*SELECT DISTINCT
    *
    from thorchain.defi.fact_swaps
    WHERE To_asset LIKE '%RUNE%'*/

    Run a query to Download Data