You could do it this way. This accounts for the possibility of duplicates in Column A and only lists each item once.
Names Default To Here( 1 );
dt = Current Data Table();
Summarize( dt, cats = By( :Column B ) );
dt_summary = New Table( "Summary", New Column( "Category", Character, "Nominal" ), New Column( "Items", Character, "Nominal" ) );
For Each( {v, i}, cats,
dt_summary << Add Rows(
{:Category = v, :Items = Concat Items( Associative Array( dt:Column A[Where( dt, :Column B == v )] ) << Get Keys, " " )}
)
);