首页 新闻 会员 周边 捐助

这个sql怎么执行不出来?有没有更有效率的sql?

0
悬赏园豆:10 [已关闭问题] 关闭于 2016-06-28 14:10

目的:获取重复的评论ID

现在有2个表,主表中的 products_id,customers_name,附表中的 reviews_text,以这3个字段判断重复条件

sql: select max(reviews_id) as max_id,reviews_id,products_id,customers_name,count(reviews_id) as total from reviews left join (select reviews_id,reviews_text from reviews_description where languages_id = 1) as rd using(reviews_id) where status=1 group by products_id,customers_name,reviews_text having total>1 order by total desc

re

views_text

reviews_text

reviews_text

ck_beyond的主页 ck_beyond | 初学一级 | 园豆:193
提问于:2016-06-23 10:36
< >
分享
所有回答(2)
0

left join 需要条件吧

laugher_ccc | 园豆:593 (小虾三级) | 2016-06-23 10:49
0

忘了结贴,该sql在本地执行1秒以内,估计是服务器的问题

ck_beyond | 园豆:193 (初学一级) | 2016-06-28 14:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册