#1013

Price Without Extra Math

The catalog currently checks doubled price against the threshold 24, making the lookup heavier than needed. Rewrite it as a direct comparison of price to the equivalent threshold 12, keeping the result sorted by id.

Original query
SELECT * FROM products WHERE price * 2 > 24 ORDER BY id

Примерен очакван изход

Така изглежда правилният отговор — броят редове е негов собствен, не е задължително да съвпада с таблиците в схемата.

idnamepricestockcategory
4Lamp2515home

Резултатът от заявката ти ще се покаже тук