求助sql语句

cofeilover 2006-11-07 12:22:25
select distinct topics.name,initurl.title,initurl.url,site,page=count(docid) from topics
left join initurl on topics.id = initurl.topicid
left join pagerepository on initurl.urlid=pagerepository.sourceid
where id in (select distinct id from zhuanti where zu = 136)
group by topics.name,initurl.title,initurl.url, pagerepository.site
order by topics.name,initurl.title,initurl.url, pagerepository.site

俺这条查询有重复,问大家是在那里出错了啊?
...全文
96 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
早起晚睡 2006-11-07
  • 打赏
  • 举报
回复
select distinct a.name,b.title,b.url,site,page=count(docid) from topics a
left join initurl b on a.id = b.topicid
left join pagerepository c on b.urlid=c.sourceid
where id in (select distinct id from zhuanti where zu = 136)
group by a.name,b.title,b.url, c.site
order by a.name,b.title,b.url, c.site
早起晚睡 2006-11-07
  • 打赏
  • 举报
回复
select distinct a.name,b.title,b.url,site,page=count(docid) from topics a
left join initurl b on topics.id = initurl.topicid
left join pagerepository c on b.urlid=c.sourceid
where id in (select distinct id from zhuanti where zu = 136)
group by a.name,b.title,b.url, c.site
order by a.name,b.title,b.url, c.site
我给你简化了一下
你还是说清楚一些就这些语句怎么知道他们之间的关系什么的
cofeilover 2006-11-07
  • 打赏
  • 举报
回复
谢谢了啊 感动的哇哇的了

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧