select c.cnname, CustName=a.chinaname , title=a.title_c,
companyName= a.company_c , a.inputnum,a.FallNumList
from t_mate_regist a,t_regist b,t_base_nation c
where a.nation=c.code and a.regid=b.regid and b.teamid is null
and b.class=10 and b.type=10 and (a.chinaname='许金诸' or a.englishname='许金诸')
group by a.company_c
having count(*)>1
order by company_c
========================
消息 8120,级别 16,状态 1,第 1 行
选择列表中的列 't_base_nation.CnName' 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。
=======================
companyName= a.company_c , a.inputnum,a.FallNumList
from t_mate_regist a,t_regist b,t_base_nation c
where a.nation=c.code and a.regid=b.regid and b.teamid is null
and b.class=10 and b.type=10 and (a.chinaname='许金诸' or a.englishname='许金诸')
group by a.company_c
having count(*)>1
order by company_c
========================
消息 8120,级别 16,状态 1,第 1 行
选择列表中的列 't_base_nation.CnName' 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。
=======================
companyName= a.company_c , a.inputnum,a.FallNumList
from t_mate_regist a,t_regist b,t_base_nation c
where a.nation=c.code and a.regid=b.regid and b.teamid is null
and b.class=10 and b.type=10 and (a.chinaname='许金诸' or a.englishname='许金诸')
group by c.cnname,a.company_c
having count(*)>1
order by company_c
companyName= a.company_c , a.inputnum,a.FallNumList
from t_mate_regist a,t_regist b,t_base_nation c
where a.nation=c.code and a.regid=b.regid and b.teamid is null
and b.class=10 and b.type=10 and (a.chinaname='许金诸' or a.englishname='许金诸')
group by a.company_c,c.cnname,a.chinaname,a.title_c,a.inputnum,a.FallNumList
having count(*)>1
order by company_c
select max(c.cnname) as cnname,
CustName=max(a.chinaname),
title=max(a.title_c),
companyName= a.company_c ,
max(a.inputnum) as inputnum,
max(a.FallNumList) as FallNumList
from t_mate_regist a,t_regist b,t_base_nation c
where a.nation=c.code and a.regid=b.regid and b.teamid is null
and b.class=10 and b.type=10 and (a.chinaname='许金诸' or a.englishname='许金诸')
group by a.company_c
having count(*)>1
order by company_c
companyName= a.company_c , a.inputnum,a.FallNumList
from t_mate_regist a,t_regist b,t_base_nation c
where a.nation=c.code and a.regid=b.regid and b.teamid is null
and b.class=10 and b.type=10 and (a.chinaname='许金诸' or a.englishname='许金诸')
group by a.company_c,c.cnname,a.chinaname,a.title_c,a.inputnum,a.FallNumList
having count(*)>1
order by company_c