daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Mar 24th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- zad 4
  2. -- 4.1
  3. -- bez pivota
  4. SELECT  YEAR(OrderDate) "Rok",
  5.         SUM(IIF(MONTH(OrderDate) = 1, 1, 0)) [1],
  6.         SUM(IIF(MONTH(OrderDate) = 2, 1, 0)) [2],
  7.         SUM(IIF(MONTH(OrderDate) = 3, 1, 0)) [3],
  8.         SUM(IIF(MONTH(OrderDate) = 4, 1, 0)) [4],
  9.         SUM(IIF(MONTH(OrderDate) = 5, 1, 0)) [5],
  10.         SUM(IIF(MONTH(OrderDate) = 6, 1, 0)) [6],
  11.         SUM(IIF(MONTH(OrderDate) = 7, 1, 0)) [7],
  12.         SUM(IIF(MONTH(OrderDate) = 8, 1, 0)) [8],
  13.         SUM(IIF(MONTH(OrderDate) = 9, 1, 0)) [9],
  14.         SUM(IIF(MONTH(OrderDate) = 10, 1, 0)) [10],
  15.         SUM(IIF(MONTH(OrderDate) = 11, 1, 0)) [11],
  16.         SUM(IIF(MONTH(OrderDate) = 12, 1, 0)) [12]
  17. FROM    Sales.SalesOrderHeader
  18. GROUP BY YEAR(OrderDate)
  19. ORDER BY 1
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
 
Top