KaskoazulLP-er Retention still providing liquidity - STATS
    Updated 2022-04-27

    with first_add as (
    select from_address,
    --tx_id,
    min(block_timestamp) as fecha
    from thorchain.liquidity_actions
    where lp_action = 'add_liquidity'
    group by 1--,2
    ),
    latest_add as (
    select from_address,
    --tx_id,
    max(block_timestamp) as fecha
    from thorchain.liquidity_actions lp
    where lp_action = 'add_liquidity'
    group by 1--,2
    ),
    total_liquidity as (
    select from_address,
    sum(rune_amount_usd) + sum(asset_amount_usd) as liquidity_provided,
    count(tx_id) as liquidity_txs
    from thorchain.liquidity_actions lp
    where lp_action = 'add_liquidity'
    group by 1 )

    select f.from_address,
    --f.tx_id as first_tx,
    f.fecha as date_first_tx,
    --lp.rune_amount_usd + lp.asset_amount_usd,
    tl.liquidity_provided as total_liq_provided,
    tl.liquidity_txs as total_liq_txs,
    --l.tx_id as last_tx,
    l.fecha as date_last_tx,
    Run a query to Download Data