1
这是另一个问题的扩展:How to display null value when the record is present more than one time in oracle sql显示空值
我有一个表中设置像以下:
c_id c_name c_tax
1001 Element1 1
1001 Element1 2
1001 Element2 1
1001 Element2 2
1002 Element3 null
1002 Element4 1
1002 Element4 2
我想在第一column(c_id)
如果显示null
根据以下条件在第三个column(c_tax)
中出现多次,是或否。
Element1
有两种税收1和2.所以Element1
应该显示一次,c_tax
应该是。 Element3
不含税,所以应该显示为null
。
我的输出结果应类似于以下内容:
c_id c_name c_tax
1001 Element1 Yes
null Element2 Yes
1002 Element3 No
null Element4 Yes
内部stackoverlow链接应粘贴生,而不是使用链接的格式。 –