【小罐茶项目】日常查数代码2

–2020/04/28:查询京东协同平台抓数情况
–注意函数convert与cast的使用方法

SELECT shopid,convert(nvarchar(100),convert(datetime,date,20),23),sum(cast(All_Outbound_Sales as int))
FROM [DMP_System_Xiaoguancha].[dbo].[JD_SupplierInventory] 
group by shopid,convert(nvarchar(100),convert(datetime,date,20),23)
order by convert(nvarchar(100),convert(datetime,date,20),23) desc

你可能感兴趣的:(SQL)