#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

Esempio di output atteso

Ecco come appare una risposta corretta — il suo numero di righe è a sé stante, non deve corrispondere alle tabelle dello schema.

idnamepricestockcategory
4Lamp2515home

Il risultato della tua query apparirà qui