【 TiDB 使用环境】TIDB7.5
【 TiDB 版本】
【复现路径】 TIDB5.1及MySQL8.0可以执行的SQL。 在TIDB7.5上出错 ERROR 3065 (HY000):。
【遇到的问题:问题现象及影响】
SQL语句:
SELECT DISTINCT b.id AS brand_id,b.brand_name from motobike.model_pic AS p LEFT JOIN motobike.series AS s on p.series_id=s.id LEFT JOIN motobike.brand AS b on s.brand_id=b.id WHERE p.type_id=5 AND p.is_del=0 and b.id is not NULL ORDER BY p.created_stime DESC limit 10;
出错:
of ORDER BY clause is not in SELECT list, references column ‘motobike.model_pic.created_stime’ which is not in SELECT list; this is incompatible with DISTINCT
请问要如何解决?
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】