Grouping trips by source or destination

How can I group Trips that have the same SOURCE_LOCATION or DESTINATION_LOCATION?
Trips table, where LOCATIONS column contains list of locations:


should help.