niloUntitled Query
    Updated 2022-10-02
    with base as ( select
    sum (LIQUIDITY_FEES) as "Fees", sum (liquidity_fees_usd) as "USD Fees",
    sum (BLOCK_REWARDS) as "Block Rrewards", sum (block_rewards_usd) as "USD Block Rrewards",
    "Block Rrewards" - "Fees" as "Difference", "Block Rrewards" / "Fees" as "Difference Ratio",
    avg(BLOCK_REWARDS - LIQUIDITY_FEES) as "AVG Difference", avg(BLOCK_REWARDS / LIQUIDITY_FEES) as "AVG Difference Ratio"
    from flipside_prod_db.thorchain.daily_earnings where LIQUIDITY_FEES_USD > 0 and LIQUIDITY_FEES > 0 and day >= CURRENT_DATE -180)

    select 'Fees' as type, "Fees" from base UNION
    select 'Block Rrewards' as type, "Block Rrewards" from base UNION
    select 'Difference' as type, "Difference" from base



    Run a query to Download Data