54uso opened a new issue, #28070:
URL: https://github.com/apache/shardingsphere/issues/28070

   ## having didn't take effect
   
   * java8
   * shardingsphere 5.2.0
   
   ### code
   ``` java
    ResultSet resultSet = 
dataSource.getConnection().createStatement().executeQuery("SELECT trade_status, 
count(1) as cnt FROM loan_order_info group by trade_status");
   while (resultSet.next()) {
       System.out.printf("group by: %d %d\n", resultSet.getInt(1), 
resultSet.getInt(2));
   }
   ResultSet resultSet1 = 
dataSource.getConnection().createStatement().executeQuery("SELECT trade_status, 
count(1) as cnt, max(id) as mid FROM loan_order_info group by trade_status 
having cnt < 30000");
   while (resultSet1.next()) {
       System.out.printf("group by having: %d %d\n", resultSet1.getInt(1), 
resultSet1.getInt(2));
   }
   ```
   ### output
   > resultSet group by: 1 35045
   > resultSet group by: 2 37838
   > resultSet group by: 3 22314
   > resultSet1 group by having: 1 35044
   > resultSet1 group by having: 2 37838
   > resultSet1 group by having: 3 22314
   


-- 
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]

Reply via email to