winnie-fsJito tips - MEV dashboard copy
    Updated 2024-09-11
    -- forked from umbnat92 / Jito tips - MEV dashboard @ https://flipsidecrypto.xyz/umbnat92/q/AuUhmRA_URqd/jito-tips---mev-dashboard

    -- forked from Jito tips @ https://flipsidecrypto.xyz/edit/queries/774532f1-c7dc-4105-bb30-e6ad3d0142dd

    with jito_tips as(
    select
    date_trunc('day', block_timestamp) as dt
    ,sum(amount) as tips
    --,amount as tip
    --,tx_id
    from solana.core.fact_transfers
    where
    (tx_to = '96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5'
    or tx_to = 'HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe'
    or tx_to = 'Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY'
    or tx_to = 'ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49'
    or tx_to = 'DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh'
    or tx_to = 'ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt'
    or tx_to = 'DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL'
    or tx_to = '3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT'
    )
    and block_timestamp > current_date() - interval '{{days}} days'
    and mint = 'So11111111111111111111111111111111111111112'

    group by dt
    )

    ,solana_fee as(
    select
    date_trunc('day', block_timestamp) as dt
    ,sum(fee * pow(10,-9)) as tot_fee
    ,sum((fee - 5000) * pow(10,-9)) as priority_fee

    from solana.core.fact_transactions
    QueryRunArchived: QueryRun has been archived