Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select "ATC_1" AS "ATC_1", SUM("Importo_Scarto") AS "Importo_Scarto", SUM("Q_Scarto") AS "Q_Scarto"
- from (SELECT
- [ATC_1]
- ,[MESE]
- ,[ANNO]
- ,[Q_Scarto]
- ,[Importo_Scarto]
- FROM [dbo].[MyTable]) T
- where (("ANNO","MESE") IN ('2017','10'),('2017','11'),('2018','01'),('2018','02'),('2018','03')
- and ("NumeroInvio") IN ('3'),('1'),('2') )
- group by "ATC_1"
Add Comment
Please, Sign In to add comment