修改时间统计

master
yulingwei 5 years ago
parent 9f156f7be4
commit cd34df0bda

@ -3030,7 +3030,7 @@ class ExportController extends Controller
ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 7).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_7, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 7).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_7,
ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 14).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_14, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 14).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_14,
ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_30, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_30,
SUM(pay_amount) as total_amt SUM(if (pay_time BETWEEN {$start_time} and ".($end_time).", pay_amount, 0)) as total_amt
FROM FROM
tab_spend tab_spend
WHERE WHERE

@ -1037,7 +1037,7 @@ if ($payids) {
ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 7).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_7, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 7).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_7,
ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 14).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_14, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 14).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_14,
ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_30, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_30,
SUM(pay_amount) as total_amt SUM(if (pay_time BETWEEN {$start_time} and ".($end_time).", pay_amount, 0)) as total_amt
FROM FROM
tab_spend tab_spend
WHERE WHERE

Loading…
Cancel
Save