gavinWithGu commented on issue #29386: URL: https://github.com/apache/shardingsphere/issues/29386#issuecomment-1881236553
Hi @linghengqian One more question, does shardingsphere support complex sql query, the table structure is as below: **table structure** ``` CREATE TABLE `operation_time` ( `id` bigint NOT NULL AUTO_INCREMENT, `count` bigint DEFAULT NULL, `created_at` datetime NOT NULL, `expansion_valve` int NOT NULL, `power` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `thing_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `unit_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ``` **SQL Query** `SELECT COUNT ( `operationt0_` . `unit_id` ) AS `unit_id_count`, `operationt0_` . `thing_id` AS `thing_id`, `operationt0_` . `unit_id` AS `unit_id` FROM `operation_time` `operationt0_` WHERE `operationt0_` . `thing_id` = ? AND ( `operationt0_` . `created_at` BETWEEN ? AND ? ) AND `operationt0_` . `power` = ? GROUP BY `operationt0_` . `thing_id` , `operationt0_` . `unit_id`` **thing_id** is the sharding_key, but the query contains **between and, group by** ,etc. -- 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-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org