我对两张表进行不同的查询,数据如下
表一:
sql 1:
select xn,xqm,xh 学号,round(avg(jd),2) 平均绩点 from T_XS_CJZLB where SCBZ= 'n' and XH in (select xh from t_xs_xsjbxxb where bjmc='14机械制造与自动化2') and xn='2014-2015' and xqm='2' group by xh,xn,xqm order by xn,xqm,平均绩点
表一:
sql 1:
select xn,xqm,xh 学号,round(avg(jd),2) 平均绩点 from T_XS_CJZLB where SCBZ= 'n' and XH in (select xh from t_xs_xsjbxxb where bjmc='14机械制造与自动化2') and xn='2014-2015' and xqm='2' group by xh,xn,xqm order by xn,xqm,平均绩点