Hi, all

As a distributed database middleware, ShardingSphere is on the way to
support all the SQL syntax as possible as we can.

This current supporting detail of `DISTINCT` syntax is as follows,

*Available SQL Of ShardingSphere*
SELECT DISTINCT * FROM tbl_name WHERE col1 = ?
SELECT DISTINCT col1 FROM tbl_name
SELECT DISTINCT col1, col2, col3 FROM tbl_name
SELECT COUNT(DISTINCT col1) FROM tbl_name
SELECT SUM(DISTINCT col1) FROM tbl_name
SELECT DISTINCT col1 FROM tbl_name ORDER BY col1
SELECT DISTINCT col1 FROM tbl_name ORDER BY col2
SELECT COUNT(DISTINCT col1) FROM tbl_name GROUP BY col1
SELECT COUNT(DISTINCT col1), col1 FROM tbl_name GROUP BY col1

*Unavailable SQL Of ShardingSphere*
SELECT DISTINCT(col1) FROM tbl_name
SELECT COUNT(DISTINCT col1 + col2) FROM tbl_name
SELECT AVG(DISTINCT col1) FROM tbl_name
SELECT COUNT(DISTINCT col1), SUM(DISTINCT col1) FROM tbl_name
SELECT col1, COUNT(DISTINCT col2) FROM tbl_name GROUP BY col1
SELECT SUM(DISTINCT col1), SUM(col1) FROM tbl_name

The next step planned is to support 1st, 2nd, 3rd, 5th, 6th of *Unavailable
SQL*, and add unit cases for them as well. The expected end time of this
task is about before January 4, 2019.
More details will be presented on the issues and Prs on gitHub, and any
progress will also be updated afterward here.

Welcome your suggestions, and wish you *merry **Christmas*

---------------------------------
Juan Pan (Trista)
Apache ShardingSphere

Reply via email to