圆通论坛

 找回密码
 立即注册
搜索
查看: 163|回复: 0

当天三段码订单 包签数量是按每包30个计算

[复制链接]

10

主题

10

帖子

52

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
52
发表于 2018-4-26 23:50:16 | 显示全部楼层 |阅读模式
--当天三段码订单包签数量是按每包30个计算
/****** Script for SelectTopNRows command from SSMS  ******/
SELECT  LEFT(RECIPIENT_COUNTY_ID,3) as 三段码,count(LEFT(RECIPIENT_COUNTY_ID,3)) AS 票数,count(LEFT(RECIPIENT_COUNTY_ID,3))/30 AS  包签数量
  FROM [ytodb].[dbo].[T_EXP_WAYBILL_DOWNLOAD_INFO]
  where DATEDIFF(DAY,CREATE_TIME,GETDATE())=0  group by LEFT(RECIPIENT_COUNTY_ID,3)
  HAVING count(LEFT(RECIPIENT_COUNTY_ID,3))>30
  order by count(LEFT(RECIPIENT_COUNTY_ID,3)) desc---备注:大头笔订单无效,


回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

QQ|圆通论坛 ( 浙ICP备15028145号-1 )

GMT+8, 2018-7-17 02:19 , Processed in 0.833984 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表