sql
空城不空99
耐得住寂寞,守得住繁华!
展开
-
SQL server 报表统计 连接查询
SQL server 报表统计 连接查询select userName as 人员, receiveEnquiryNum as 收到的询单数, receiveInstanceNum as 收到的流程数, shouldFinishEnquiryNum as 应完成的询单数, noOverTimeFinishEnquiryNum as 及时完成的询单数, overTimeFinishEnquiryNum as 超时完成的询单数, backlogEnquiryNu原创 2020-05-09 19:23:29 · 566 阅读 · 2 评论 -
SQL server 树结构查询 连接查询 子查询 分组查询
server SQL树结构查询 连接查询 子查询 分组查询select vipName as 大客户, questionCategory as 问题一级分类, questionSecondCategory as 问题二级分类, COUNT(qc.EnquiryId) as 数量from (select b.Name as vipName, (case...原创 2020-04-26 14:03:48 · 285 阅读 · 0 评论 -
SQL server 连接查询,分组查询
SELECT b.Name as "大客户",SUM((case Month(e.CreateDate) when 1 then 1 else 0 end)) as Month1,SUM((case Month(e.CreateDate) when 2 then 1 else 0 end)) as Month2,SUM((case Month(e.CreateDate) when 3 the...原创 2020-04-14 12:08:26 · 198 阅读 · 0 评论