You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:33:05 UTC
[GitHub] [shardingsphere] zhao-en opened a new issue, #20081: when the 'distinct' and 'group by' are used in one sql , the 'group by' will be replace by 'order by ' after creating ShardingSphere-SQL
zhao-en opened a new issue, #20081:
URL: https://github.com/apache/shardingsphere/issues/20081
when the 'distinct' and 'group by' are used in one sql , the 'group by' will be replace by 'order by ' after creating ShardingSphere-SQL
CASE:
Logic SQL:
SELECT COUNT(DISTINCT DATE_FORMAT(LEFT(b.create_date,13),'%Y-%m-%d %H')) hourNum, date FROM table_name b where (b.p_id,b.d_id) IN ( (?, ?) ) and b.create_date >= ? AND b.create_date < ? GROUP BY date,d_id
Actual SQL:
SELECT COUNT(DISTINCT DATE_FORMAT(LEFT(b.create_date,13),'%Y-%m-%d %H')) hourNum, date FROM table_name_1 b where (b.p_id,b.d_id) IN ( (?, ?) ) and b.create_date >= ? AND b.create_date < ? ORDER BY DATE ASC,deviceId ASC
version: 5.1
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zhao-en commented on issue #20081: when the 'distinct' and 'group by' are used in one sql , the 'group by' will be replace by 'order by ' after creating ShardingSphere-SQL
Posted by GitBox <gi...@apache.org>.
zhao-en commented on issue #20081:
URL: https://github.com/apache/shardingsphere/issues/20081#issuecomment-1272348993
您好,您的邮件我已经收到,我会尽快处理!
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] commented on issue #20081: when the 'distinct' and 'group by' are used in one sql , the 'group by' will be replace by 'order by ' after creating ShardingSphere-SQL
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20081:
URL: https://github.com/apache/shardingsphere/issues/20081#issuecomment-1272348894
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] closed issue #20081: when the 'distinct' and 'group by' are used in one sql , the 'group by' will be replace by 'order by ' after creating ShardingSphere-SQL
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #20081: when the 'distinct' and 'group by' are used in one sql , the 'group by' will be replace by 'order by ' after creating ShardingSphere-SQL
URL: https://github.com/apache/shardingsphere/issues/20081
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org