Created
November 24, 2022 14:42
-
-
Save mshakhomirov/694e040539b0d1b556f8e053d315a3bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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