I have a scenario where I have following data:
Table: Locations
ID TYPE
------------------
1000 STORE
11001 STORE
20000 STORE
1181 WAREHOUSE
12002 STORE
I want to sort in a way that all the IDs that end in '0000' should be sorted first, then the TYPE 'Warehouse' and then the rest of the Stores.
The desired output should be like
ID TYPE
------------------
10000 STORE
20000 STORE
1181 WAREHOUSE
11001 STORE
12002 STORE
How do I do this custom sorting?
This is how I understood the problem; sample data till line #7; query begins at line #8.