Q:

How to divide counts on a single table?

This is Postgres 8.x, specifically Redshift
I have a table that I'm querying to return a single value, which is the result of a simple division operation. Table's grain looks along the likes of user_id | campaign_title.
Division operation is like the count of rows where campaign_name is ilike %completed% divided by count of distinct user_ids.
So I have the numerator and denominator queries all written out, but I'm honestly confused how to combine them. 
Numerator: 
select count(*) as num_completed
from public.reward
where campaign_title ilike '%completion%'
;

Denominator:
select count(distinct(user_id))
from public.reward

A:

The straightforward solution, just divide one by the other:
select (select count(*) as num_completed
        from public.reward 
        where campaign_title ilike '%completion%') 
        / 
       (select count(distinct user_id) from public.reward);

The slightly more complicated but faster solution:
select count(case when campaign_title ilike '%completion%' then 1 end) 
       /
       count(distinct user_id)
from public.reward;

The expression count(case when campaign_title ilike '%completion%' then 1 end) will only count rows that meet the condition specified in the when clause.

Unrelated but: 
distinct is not a function. Writing distinct(user_id) is useless. And - in the case of Postgres - it can actually get you into trouble if you keep thinking of distinct as a function, because the expression (column_one, column_2) is something different in Postgres than the list of columns: column_one, column_2 

