Skip to content Skip to sidebar Skip to footer

Sap Hana Sql Query To Find All Possible Combinations Between Two Columns

The target is to create all possible combinations of joining the two columns using SAP HANA SQL. every article of the first column ('100','101','102','103') must be in the combinat

Solution 1:

How about:

select article, 
       count(supplier) as nb_supplier,
       STRING_AGG(supplier,',') as list_suppliers
from (select distinct article, supplier from basis)
group by article

Post a Comment for "Sap Hana Sql Query To Find All Possible Combinations Between Two Columns"