📅  最后修改于: 2022-03-11 15:05:06.239000             🧑  作者: Mango
SELECT * FROM
( SELECT column1,column2
FROM
tables
WHERE conditions
)
PIVOT
(
aggregate_function(column2)
FOR column2
IN ( expr1, expr2, ... expr_n ) | subquery )
order by expression[asc | desc];