0
是有可能做這樣的查詢:串聯聚合函數和字符串屬性
select wm_concat(some_attribute1) || some_string_attribute || wm_concat(some_attribute2)
from SomeTable;
感謝,
是有可能做這樣的查詢:串聯聚合函數和字符串屬性
select wm_concat(some_attribute1) || some_string_attribute || wm_concat(some_attribute2)
from SomeTable;
感謝,
你應該只能夠這樣做,如果有一組由
select wm_concat(some_attribute1) || some_string_attribute || wm_concat(some_attribute2)
from SomeTable
group by some_string_attribute;
或者如果第二部分也是聚合物
select wm_concat(some_attribute1) || max(some_string_attribute) || wm_concat(some_attribute2)
from SomeTable
group by some_string_attribute;
但我不認爲它會工作,你已經證明,因爲你是混合非集合彙總,類似於
select product, sum(price) from sometable
(即該產品由於是由沒有組)
試試這個:
select
wm_concat(attribute_the_first) colNameWon,
the_agregation_attribute,
wm_concat(attribute_the_second) colNameToo
from
table_mien
group by
the_agregation_attribute
如果你得到你想要的結果(3列),則該字符串concatination會給你你所追求的。