Reputation: 61
I have such statement in attachment and can anybody help me.
I need to divide the value of " CountUnSuccess" to "Count" and show that result in a statement. Could you please help, what I need to add in the statement in order that happens?
Thank you
Upvotes: 1
Views: 253
Reputation: 82196
How about
SELECT
COUNT(P2._total)/NULLIF(COUNT(p1.total)/100.0, 0.0) AS div
Alternatively
SELECT
COUNT(P2._total)*100.0/NULLIF(COUNT(p1.total), 0.0) AS div
Upvotes: 1