I have a list of orders in a SQL table, and for each order I have a ship-to country code.
example:
order country_code
X00145 GB
X00178 FR
D55454 AL
E54566 GB
F59565 IE
O84849 ES
K54545 US
N61465 GB
W65478 GB
I am trying to sort the output so orders that are not going to country_code GB are returned first, alphabetically , and then have the GB orders come last (like after IE and US in my example above).
Using "ORDER BY" only lets me filter with ASC or DESC. Is there a way to use a clause along with "ORDER BY"? (I guess not because I could not find anything online)?
You can use
order by field()
DEMO