INNER JOIN rb_customer_balancedetail b on o.OrderId = b.OrderId
WHERE o.Group_Id ={groupId} and o.OrderState =1 and o.OrderSource =9 and o.PayState =1 and b.RebateType =1 and b.BalanceType =1 and b.BalanceState =2 and o.PayDate <='{dateStr} 23:59:59'