Answers for "order by array by value postgres"

SQL
1

order by postgresql

SELECT
	select_list
FROM
	table_name
ORDER BY
	sort_expression1 [ASC | DESC],
        ...
	sort_expressionN [ASC | DESC];Code language: SQL (Structured Query Language) (sql)
Posted by: Guest on February-01-2021
0

sort by highest number postgres

postgres=# select deptno,max(sal) from emp group by deptno order by max(sal);

 deptno |   max   

--------+---------

     30 | 2850.00

     20 | 3000.00

     10 | 5000.00

(3 rows)
Posted by: Guest on January-11-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language