Comments
4 comments
-
Another good example is the formatting of the following code
SELECT
CustomerKey
, YEAR(OrderDate) AS OrderYear
, SalesAmount
, LEAD(SalesAmount, 1, 0) OVER (PARTITION BY CustomerKey
ORDER BY
YEAR(OrderDate)
)
FROM
FactInternetSales
WHERE
SalesTerritoryKey = 1
AND YEAR(OrderDate) = 2014;
it should look something like thisSELECTCustomerKey, YEAR(OrderDate) AS OrderYear, SalesAmount, LEAD(SalesAmount, 1, 0) OVER(PARTITION BY CustomerKey ORDER BY YEAR(OrderDate))FROMFactInternetSalesWHERESalesTerritoryKey = 1AND YEAR(OrderDate) = 2014; -
@torsten.strauss
Can you share your format style file with us? -
Hi Tianjiao,
thanks for looking into this!
Please find attached the style.
Torsten -
Hi @torsten.strauss
Thanks for your patience!
The development team has triaged this issue. We accept this isn't right, but there are more impact issues we are currently working on so I'm afraid this behaviour won't get changed any time soon.
We apologize for the inconvenience caused.
Add comment
Please sign in to leave a comment.
shipperid, YEAR(shippeddate) AS shipyear, COUNT(*) AS numorders
FROM
Sales.Orders
GROUP BY
GROUPING SETS((shipperid, YEAR(shippeddate)), (shipperid), (YEAR(
shippeddate
)), ());
shipperid, YEAR(shippeddate) AS shipyear, COUNT(*) AS numorders
FROM
Sales.Orders
GROUP BY
GROUPING SETS((shipperid, YEAR(shippeddate)), (shipperid),
(YEAR(shippeddate)), ());