随笔分类 -  SQL

摘要:之前做货品横向展示时,有看到评论说用到交叉表。 公司最近需要给订单表做一个数据汇总的功能,同事给到一个参考SQL select * from (select COUNT(1) as 已锁定 from tbl_order where orderLock = 1) as A,(select COUNT( 阅读全文
posted @ 2016-06-23 11:20 唐崇杨 阅读(1683) 评论(0) 推荐(0)
摘要:SQL: select *,(A24+A26+A28+A29+A30+A31+A32+A33+A34+A35+A36+A37+A38+A39+A40+A41+A42+A43+A44) as Number from (select Tz.productno,Tz.color,Tz.warehousei 阅读全文
posted @ 2016-04-26 15:13 唐崇杨 阅读(672) 评论(2) 推荐(1)