- 论坛徽章:
- 0
|
group by 还是不明白!
select t4.fnumber as 物料代码,t4.fname as 物料名称,t3.fnumber as 厂商代码,
t3.fname as 厂商名称,t5.fnumber as 币别,t1.fprice as 当前单价,t2.fpohighprice as 采购最高限价,
(t1.fprice-t2.fpohighprice) as 价格差异,(t1.fprice-t2.fpohighprice)/t1.fprice as 限价比例,
CONVERT(varchar(10),t1.fquotetime,126) as 生效如期,
CONVERT(varchar(10),t1.fdisabledate,126) as 失效日期,
CONVERT(varchar(10),t1.FlastmodifiedDate,126) as 修改日期,
(Case When t1.FUsed=1 Then \'已审核\' Else \'未审核\' end) as 审核状态
from T_supplyentry t1
Inner Join T_supply t2 On t1.fitemid=t2.fitemid
Inner Join T_supplier t3 on t2.fsupid=t3.fitemId
Inner Join T_icitem t4 on t1.fitemid=t4.fitemId
Inner Join T_currency t5 on t1.FcyId=t5.FcurrencyId
where t1.fptype=1
group by #########
还是不明白 group 的用法,假如是上面的语句,你说group by 后面应该加上什么? |
|