Guest User

Untitled

a guest
Jun 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. select "ATC_1" AS "ATC_1", SUM("Importo_Scarto") AS "Importo_Scarto", SUM("Q_Scarto") AS "Q_Scarto"
  2. from (SELECT
  3. [ATC_1]
  4. ,[MESE]
  5. ,[ANNO]
  6. ,[Q_Scarto]
  7. ,[Importo_Scarto]
  8. FROM [dbo].[MyTable]) T
  9. where (("ANNO","MESE") IN ('2017','10'),('2017','11'),('2018','01'),('2018','02'),('2018','03')
  10. and ("NumeroInvio") IN ('3'),('1'),('2') )
  11. group by "ATC_1"
Add Comment
Please, Sign In to add comment