Advertisement
Guest User

wvr

a guest
Oct 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. $tdataIPCash_current_month[".sqlHead"] = "SELECT mnth_name, day_of_mnth, day_name, Round(SUM(cust_price), 2) AS sell_price, Round(SUM(cost_price), 2) AS cost_price, COUNT(*) AS calls, COUNT(case when duration > 0 then 1 end) AS connected, SUM(duration) AS seconds, Round(Sum(duration) / 60.00,4) AS minutes, Round(SUM(profit),2) AS margin, (case when sum(cost_price) != 0 then Round(sum(profit) / SUM(cost_price),6) else 0 end) * 100 AS margin_perc";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement