12345678910111213141516 |
- /****** Script for SelectTopNRows command from SSMS ******/
- SELECT [开单人]
- ,[id] '订单号'
- ,[date] '收款日期'
- ,[money] '金额'
- ,[bz] '收款项目名称'
- ,[ren] '收款人'
- ,[paytype] '支付方式'
- ,[name1] '老板姓名'
- ,[name2] '影楼名称'
- ,[txtype] '套系类型'
- ,[taoxiname] '版本类型'
- FROM [Internal].[dbo].[dindanbukuanview##] where bz like '%服务费%' and [date] like '2014%' order by [开单人]
- SELECT [开单人],sum(convert(int,[money],10)) '金额'
- FROM [Internal].[dbo].[dindanbukuanview##] where bz like '%服务费%' and [date] like '2014%' group by [开单人]
|