Skip to content

Instantly share code, notes, and snippets.

@djvs
Created October 2, 2017 20:49
Show Gist options
  • Save djvs/7d5c03955ca2f516635105b24fed1f54 to your computer and use it in GitHub Desktop.
Save djvs/7d5c03955ca2f516635105b24fed1f54 to your computer and use it in GitHub Desktop.
select
(count(*) filter (where confirmed) * 100.0 / nullif(count(*),0) )
from foobar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment