AephiaMy scanning fleets_opt
    Updated 7 hours ago
    WITH scanning AS (
    SELECT
    *
    from $query('c7d84fbe-8ecd-47da-9564-dce10ed11179')
    WHERE player_profile = '{{player_profile}}'

    )


    ,last_value AS (
    SELECT
    *
    from $query('6a2519e0-27f9-4633-8fe0-8934f60d6bb2')
    )

    ,sdu_calculations AS (
    SELECT
    x.date
    ,x.scanning_fleet
    ,sdu_found
    ,sdu_max
    ,sdu_missing_out
    ,sdu_price
    ,atlas_price
    ,sol_price
    ,sum(sol_payed) as txs_costs_sol
    ,round(nullifzero(sdu_found) / zeroifnull(sdu_max),2) as SDU_factor
    ,round(sdu_missing_out * sdu_price * atlas_price / nullifzero((txs_costs_sol * sol_price)) * 100,2) as SDU_to_fee_ratio_pct


    FROM scanning x
    left outer join last_value z on x.date = z.date
    group by 1,2,3,4,5,6,7,8
    Last run: about 7 hours ago
    No Data to Display
    0
    2B
    3s