freshgeek commented on issue #28674:
URL:
https://github.com/apache/shardingsphere/issues/28674#issuecomment-1751953564
Just now,i try split this sql:
```
select bb.*, gg.total_price as totalPrice from (select o.user_id,
sum(o.reward_number) as reward_number, sum(order_amount) as order_amount,
sum(pay_wechat_amount) as pay_wechat_amount, sum(pay_account_amount) as
pay_account_amount, sum(pay_coin_amount) as pay_coin_amount,
sum(pay_points_amount) as pay_points_amount, sum(coupon_reduce) as
coupon_reduce from TABLE1 o where 1=1 and o.goods_id = ? and o.current_box = ?
and o.order_status = 20 and o.order_type = 0 group by o.`user_id` order by
order_amount desc ) bb left join (select user_id, sum(g.number *
g.retrieve_price) as total_price from TABLE2 g where 1=1 and g.goods_id = ? and
g.current_box = ? group by `user_id`) gg on gg.user_id = bb.user_id
```
TO
```
select o.user_id, sum(o.reward_number) as reward_number, sum(order_amount)
as order_amount, sum(pay_wechat_amount) as pay_wechat_amount,
sum(pay_account_amount) as pay_account_amount, sum(pay_coin_amount) as
pay_coin_amount, sum(pay_points_amount) as pay_points_amount,
sum(coupon_reduce) as coupon_reduce from TABLE1 o where 1=1 and o.goods_id = ?
and o.current_box = ? and o.order_status = 20 and o.order_type = 0 group by
o.`user_id` order by order_amount desc
```
AND
```
select user_id, sum(g.number * g.retrieve_price) as total_price from TABLE2
g where 1=1 and g.goods_id = ? and g.current_box = ? group by `user_id`
```
THIS IS normal operation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]