Answer the question
In order to leave comments, you need to log in
How to sort SQL by price ranges?
Products are displayed on the site in accordance with some kind of sorting (by name, by priority, etc.)
You need to make sure that products with 0<price<1000000 are displayed at the beginning, and then with price=0 or >=1000000.
I understand how to do this with 2 queries, combining them into one result (UNION), but is it possible to somehow do this with one query using the standard SQL sorting mechanism?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question