How do I Order By on multiple rows in Postgresql
Simply order them  with the right orde4r with DESC for descending
Schema (PostgreSQL v9.6)
CREATE TABLE test (
  &quot;name&quot; VARCHAR(7),
  &quot;critical&quot; INTEGER,
  &quot;major&quot; INTEGER,
  &quot;trivial&quot; INTEGER
);

INSERT INTO test
  (&quot;name&quot;, &quot;critical&quot;, &quot;major&quot;, &quot;trivial&quot;)
VALUES
  ('Apache', '2', '3', '2'),
  ('Eclipse', '5', '0', '4'),
  ('TestNg', '0', '0', '5'),
  ('JUnit', '0', '2', '7');


Query #1
SELECT * FROM test
ORDER BY &quot;critical&quot; DESC, &quot;major&quot; DESC, &quot;trivial&quot; DESC;

| name    | critical | major | trivial |
| ------- | -------- | ----- | ------- |
| Eclipse | 5        | 0     | 4       |
| Apache  | 2        | 3     | 2       |
| JUnit   | 0        | 2     | 7       |
| TestNg  | 0        | 0     | 5       |


View on DB Fiddle