Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE VIEW [dbo].[SalesAggregated] with schemabinding AS
- SELECT
- BusinessDate,
- ItemId
- ,COUNT_BIG(*) AS NumberOfRows
- ,SUM(Gross) AS Gross
- FROM [dbo].[myTable]
- GROUP BY BusinessDate, ItemId
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement