【发布时间】:2021-10-20 21:58:40
【问题描述】:
【问题讨论】:
标签: sql oracle group-by pivot grouping
【问题讨论】:
标签: sql oracle group-by pivot grouping
您可以使用条件案例表达式和聚合。
select Attribute,
Max(case when action='produced' then date end) as Produced_Date,
Max(case when action='sold' then date end) as Sold_Date
from t
group by Attribute
【讨论】: