0

例如:

SELECT groupdate
FROM ccl9t_az_articles
WHERE groupdate IN (
   SELECT * FROM ccl9t_az_articles LIMIT 3 OFFSET 2
)
GROUP BY groupdate

正确的方法是什么?

4

1 回答 1

0

在错误显示上面的代码返回如下

MariaDB 还不支持 'LIMIT & IN/ALL/ANY/SOME 子查询

通过将上面的代码更改为:

    SELECT * FROM ccl9t_az_articles as group1 INNER JOIN (
SELECT groupdate FROM ccl9t_az_articles LIMIT 3 OFFSET 2
) 
as group2 ON group1.groupdate = group2.groupdate GROUP BY group1.groupdate
于 2018-01-22T13:37:00.850 回答