Skip to content

Instantly share code, notes, and snippets.

@jamii

jamii/.sql Secret

Created July 26, 2022 00:01
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 jamii/001a91b7d50fc2096f7888a394374fe7 to your computer and use it in GitHub Desktop.
Save jamii/001a91b7d50fc2096f7888a394374fe7 to your computer and use it in GitHub Desktop.
create view tagged as
select *,
(
select rule.tag
from rule
where contains(tx.description, rule.keyword)
limit 1
) as tag
from tx;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment