Expensive Products in Category
The storefront opens products for a chosen category and shows higher-priced items first by price. Add an index on category and price in highest-price-first order.
Speed this query up with an index
CREATE INDEX ix_products_cat_price ON products (category, price DESC)
Just CREATE/ALTER/DROP — no trailing SELECT needed.
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in