1
Is there any 12c bank function you can use on listagg
and does not bring repeated results?
SELECT SUM(quantidade) quantidade,
LISTAGG (mib.segment1, ' - ') WITHIN GROUP (ORDER BY ROWNUM) item,
LISTAGG (mib.description, ' - ') WITHIN GROUP (ORDER BY ROWNUM) descricao
FROM xg_tab_om_pedido_pneus a,
xg_tab_om_dpn_pedidos b,
xg_tab_om_dpns cc,
mtl_system_items_b mib
WHERE a.id_dpn_pedido = b.id_dpn_pedido
AND b.id_dpn = cc.id_dpn
AND mib.inventory_item_id = a.inventory_item_id
AND mib.organization_id = c.ship_from_org_id
This query returns me repeated items, I would like the return is unique value.