对于每个function palindrome(str) {
return str.split(‘’).every((char, i) => {
return char === str[str.length - i - 1];
});
}
,几行中都会出现几个名称。
如何使它们全部显示在一行中?
ids
意外结果:
select
cli.client, stb.macaddres, stb.unica as card,
pro.name
from
clientes cli
inner join boxes stb on stb.nuclient = cli.nuclient
inner join date.servicio ser on ser.ids = stb.ids
inner join date.producto pro on pro.proid = ser.serid
where
cli.client=7;
所需结果:
client macaddress única name
7 xxxxxxxxx 56565 product1
7 xxxxxxxxx 56565 product2
7 xxxxxxxxx 56565 product3
答案 0 :(得分:0)
您可以按照戈登在评论中所说的listagg()
进行操作,您可以在此处阅读有关文档ListAGG()的信息
对于您的查询:
select
cli.client, stb.macaddres, stb.unica as card
LISTAGG(pro.name, ', ') WITHIN GROUP (ORDER BY pro.proid ASC) "Name"
from
clientes cli
inner join boxes stb on stb.nuclient = cli.nuclient
inner join date.servicio ser on ser.ids = stb.ids
inner join date.producto pro on pro.proid = ser.serid
where
cli.client = 7;
Group By
cli.client, stb.macaddres, stb.unica