->field("s.game_id,g.relation_game_name game_name, g.unique_code, p.partner as partner_name, g.game_type_name,
SUM(CASE WHEN pay_way > 0 and s.pay_status = 1 and pay_game_status = 1 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way > 0 and s.pay_status = 1 and pay_game_status = 1 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 and s.pay_status = 1 and pay_game_status = 1 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = 0 and s.pay_status = 1 and pay_game_status = 1 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 and s.pay_status = 1 and pay_game_status = 1 THEN pay_amount ELSE 0 END) as inside_cash_count,g.sdk_version,notice_fail_count")
SUM(CASE WHEN pay_way = -1 and s.pay_status = 1 and pay_game_status = 1 THEN pay_amount ELSE 0 END) as inside_cash_count,
->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
SUM(CASE WHEN s.pay_status = 1 and pay_game_status = 0 THEN pay_amount ELSE 0 END) as notice_fail_count");
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id')
$base = [
->join("LEFT JOIN ({$noticeFailData})a ON s.game_id = a.game_id")
'cash_count' => 0,
->where(['s.pay_status' => 1])
'balance_coin_count' => 0,
// ->where("(s.pay_status = 1 and pay_game_status = 1) or (s.pay_status = 1 and pay_game_status = 0)")