Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. CREATE VIEW [dbo].[SalesAggregated] with schemabinding AS
  2. SELECT
  3. BusinessDate,
  4. ItemId
  5. ,COUNT_BIG(*) AS NumberOfRows
  6. ,SUM(Gross) AS Gross
  7. FROM [dbo].[myTable]
  8. GROUP BY BusinessDate, ItemId
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement