sql中要这样查询该怎么写???急!!!!!!!!!!!!!!

feeling_vb 2004-03-19 10:41:21
select count(*) from
(select 行业名称,媒体名称,一级编码 from aaa
group by 行业名称,媒体名称,一级编码)

这个查询语句不能执行 该怎么写!!!
...全文
32 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
progress99 2004-03-19
  • 打赏
  • 举报
回复
select count(*) from
(select distinct 行业名称,媒体名称,一级编码 from aaa
) a

yyc82 2004-03-19
  • 打赏
  • 举报
回复
select count(*) from
(select 行业名称,媒体名称,一级编码=min(一级编码) from aaa
group by 行业名称,媒体名称)



zheninchangjiang 2004-03-19
  • 打赏
  • 举报
回复
select count(*) from
(select 行业名称,媒体名称,一级编码 from aaa
group by 行业名称,媒体名称,一级编码) a
feeling_vb 2004-03-19
  • 打赏
  • 举报
回复
好像不行哦!!
leeboyan 2004-03-19
  • 打赏
  • 举报
回复
这样呢?
select count(a.*) from
(select 行业名称,媒体名称,一级编码 from aaa
group by 行业名称,媒体名称,一级编码) a

34,838

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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