SQL - Get the values of another column for values in a given column
with data as
(
  select 'Apple' as item, 'Rome' as destination from dual union all
  select 'Apple' as item, 'Barcelona' as destination from dual union all
  select 'Apple' as item, 'Moscow' as destination from dual union all
  select 'Apple' as item, 'Paris' as destination from dual union all
  select 'Apple' as item, 'London' as destination from dual union all
  select 'Orange' as item, 'Cairo' as destination from dual union all
  select 'Orange' as item, 'Cairo' as destination from dual union all
  select 'Orange' as item, 'Cairo' as destination from dual union all
  select 'Grapes' as item, 'Berlin' as destination from dual union all
  select 'Rice' as item, 'Manila' as destination from dual
)
select Item,
listagg(Destination, ',') within group (order by Destination) as Destination
from data
group by Item having count(distinct destination) &gt; 1;

ITEM   DESTINATION                                       
------ --------------------------------------------------
Apple  Barcelona,London,Moscow,Paris,Rome