Find the bugs: the highest-priced item in each order

Find the item with the highest unit price in each order. If several items share the highest price, return all of them. Mark the lines that contain errors.

Find the errorsSubqueries, CTEs, EXISTS / IN, UNIONMiddleAnalystData EngineerBackend
Input data · iv_order_items
idorder_idproductquantityprice
11pen102.00
21notebook110.00
32pen14.00
43notebook510.00
53bag150.00
64pen23.00
75pen310.00
87bag260.00
98notebook240.00
SELECT order_id, product, price
FROM iv_order_items
WHERE price IN (
  SELECT MAX(price)
  FROM iv_order_items
  GROUP BY order_id
)
ORDER BY order_id, product