我有一个标准查询,如下所示:
Select
X
From Y
Left Join Z
On ....
Where A and B它给出了一个这样的表:
Product Type Product Sub-type Process Sequence_Number
X X.1 A 1
X X.1 C 2
X X.1 D 3
X X.2 A 1
X X.2 B 2
X X.2 C 3
X X.2 D 4
X X.2 E 5我想要聚合特定产品类型X的所有产品子类型流程,以得到一个统一的流程列表,例如:
Product Type Process
X A
X B
X C
X D
X E正如您所看到的,子类型进程之间的共性是存在的,子类型x.1中的空白已经被x.2进程所填补。
发布于 2020-04-02 04:40:28
您可以使用select distinct生成结果
select distinct product_type, process
from . . .
where . . .;https://stackoverflow.com/questions/60979864
复制相似问题