1

I have a MySQL Database table with all the calls made by each user. The rows looks like:

id  Origin Number   Destination Number  Amount  InSec   Event Time  Event Date  YYYYMM
16196   Caller XXX  Called XXX  15.1223 825 18:02:00    03/12/2011  201112

The table contains 11500 rows and I need to analyze the feasibility of a certain offer which has the same rate for the first 5 call minutes and then has a different rate starting from the 6th minute until the end of the call. I can’t think of any solution except checking the top callers and doing the analysis manually, but it is very time consuming. Any idea on how to solve such request?

regards

4

1 回答 1

0

根据我们的评论,这是一个正式的 sql 建议,可以通过更新的计划来提取收益:

SELECT IF(InSec > 5 * 60, ( InSec - 5 * 60 ) * ( old_rate - new_rate ), 0 ) AS savings from ...

是你所期望的吗?

于 2012-06-28T13:33:05.210 回答