I have the following query that gives me a click percentage based on how many email alerts have been sent out and how many of those have been clicked on.
select sID, keyword, clicked, alerts, clicked/alerts*100 as percent from searches where clicked < alerts and clicked > 0;
I tried adding the following to the WHERE clause, but the query failed:
where percent < 33.33
What is the best way to add that I only want to see results where the percentage is less than 33.33 ?
, 100.0*clicked/alerts AS percent
WHERE clicked > 0
AND 100.0*clicked/alerts < 33.33
note i remove clicked < alerts because that's implied by the 33% condition
Thanks brother, works like a charm.