Skip to content

Instantly share code, notes, and snippets.

@mshakhomirov
Created November 24, 2022 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshakhomirov/694e040539b0d1b556f8e053d315a3bf to your computer and use it in GitHub Desktop.
Save mshakhomirov/694e040539b0d1b556f8e053d315a3bf to your computer and use it in GitHub Desktop.
with titles as (
select 'Title with word foo' as title union all
select 'Title with word bar'
)
, data as (
select
title,
split(title, ' ') as words
from
titles
)
select * from data, unnest(words) words
where
words in ('bar')
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment