I have a table with 3 fields, let us say field1, field2, and field3. The value in field2 is either 0 or 1.
I am trying to fetch field1 in a way to always have all the rows where the value is 1 in field2 displayed first and arranged by field3, and then display the rest of data, also arranged by field3.
My research told me one can order by two fields, let us say ‘Order by field2 Desc, field 3’ but this really is not giving the expected result. Any idea?
One small change is required for MySQL:
Or for standard SQL: