Advertisement
eriapolova

SQL_27_adv

Jun 27th, 2023
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.21 KB | None | 0 0
  1. SELECT purchase_order_id,
  2.     ROUND(subtotal,1) AS subtotal,
  3.     ROUND(MIN(subtotal) OVER(ORDER BY purchase_order_id RANGE BETWEEN CURRENT ROW AND 20 FOLLOWING),1) AS min_subtotal
  4. FROM adventure.purchase_order_header;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement