I am working with a database and trying to get all the individual words that appear in 3 columns. I am SELECTing from columns title, description, and manufacturer, and using regexp_split_to_table to split into words on whitespace/punctuation/other relevant delimiters.
Right now I'm displaying 3 different columns, each with the results from title, description, and manufacturer respectively, but I want one column word where the results of all columns appear.
Here's what I have so far:
SELECT regexp_split_to_table(trim(lower(title)), '\s+|[.()?<>!""@#$%&*;-_\/]+|[0-9]+|([0-9]+x{1}[0-9]+|[0-9]+|([0-9]+x{1}[0-9]+)')
AS word1,
regexp_split_to_table(trim(lower(description)), '\s+|[.()?<>!""@#$%&*;-_\/]+|[0-9]+|([0-9]+x{1}[0-9]+|[0-9]+|([0-9]+x{1}[0-9]+)')
AS word2,
regexp_split_to_table(trim(lower(manufacturer)), '\s+|[.()?<>!""@#$%&*;-_\/]+|[0-9]+|([0-9]+x{1}[0-9]+)\s+|[.()?<>!""@#$%&*\/]+|[0-9]+|([0-9]+x{1}[0-9]+)')
AS word3
FROM amazon
LIMIT 500;