24 lines
455 B
MySQL
24 lines
455 B
MySQL
|
SELECT
|
||
|
sw.bill_dba,
|
||
|
sw.ship_dba,
|
||
|
sw.dsm,
|
||
|
sw.budget_2024,
|
||
|
sw.shipments_2023,
|
||
|
sw.shipments_2024,
|
||
|
sw.open_orders_2024,
|
||
|
sw.quotes,
|
||
|
--(shipments_2024 + open_orders_2024) - shipments_2023 yoy_delta,
|
||
|
(shipments_2024 + open_orders_2024) - budget_2024 yoy_delta,
|
||
|
sw.flag,
|
||
|
sw.bucket,
|
||
|
sw.attainment,
|
||
|
sw.notes
|
||
|
FROM
|
||
|
rlarp.sales_walk_r1 sw
|
||
|
WHERE
|
||
|
(sw.dsm = ?)
|
||
|
ORDER BY
|
||
|
sw.shipments_2023 desc,
|
||
|
shipments_2024 + open_orders_2024 desc,
|
||
|
quotes desc
|