a guest Aug 14th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand