Skip to content

Instantly share code, notes, and snippets.

@camilajenny
Created January 23, 2026 22:18
Show Gist options
  • Select an option

  • Save camilajenny/e34248b0c1ed5cdc8773a13f7ccbf829 to your computer and use it in GitHub Desktop.

Select an option

Save camilajenny/e34248b0c1ed5cdc8773a13f7ccbf829 to your computer and use it in GitHub Desktop.
count notes starting with emoji by colors
select
sum(case when n.title like 'πŸŸͺ %' then 1 else 0 end) as purple,
sum(case when n.title like '🟩 %' then 1 else 0 end) as green,
sum(case when n.title like '🟦 %' then 1 else 0 end) as blue,
sum(case when n.title like 'πŸŸ₯ %' then 1 else 0 end) as red,
sum(case when n.title like '🟨 %' then 1 else 0 end) as yellow,
sum(case when n.title like '🟫 %' then 1 else 0 end) as brown,
sum(case when n.title like 'πŸ”³ %' then 1 else 0 end) as white,
sum(case when n.title like '⬛ %' then 1 else 0 end) as black,
sum(case when n.title like '🟧 %' then 1 else 0 end) as orange
from notes n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment