nathan-castor
4/25/2018 - 8:29 PM

Avoid SQL Divide-by-zero errors by using NULLIF

elect
  count(name) / NULLIF( count(*), 0)
from xyz