I'd like to get the distinct values that occur in either of two columns (or in both). Not the grouping of the columns, but the individual values themselves.
For example, querying a table of air travel routes with columns ORIGIN and DESTINATION. I'd like to get the list of all airports, regardless of whether it is an origin or destination.
SFO, LGA SFO, LAX JFK, LAX JFK, SFO LAX, SFO LAX, LGA Should return
LAX, SFO, LGA, JFK I am using Postgres 9.6 if it makes any difference.