Table structure:.
InvoiceLineKey(string),
Revenue(float),
COGS(float),
Cost1(float),
Cost2(float),
Cost3(float),
Cost4(float),
Cost5(float),
Proft(float),
QSPEC(float).
Number of rows : 60,000,000 records
SELECT
InvoiceLineKey,
Revenue,
COGS,
Cost1,
Cost2,
Cost3,
Cost4,
Cost5,
Proft,
"" AS QSPEC,
RANK() OVER(ORDER BY Revenue DESC) AS Ranking,
SUM(Revenue) OVER(ORDER BY Revenue DESC) AS CumulativeRevenue
FROM
[pi-training:training.training_fact]
WHERE
Revenue > 0
ORDER BY
Revenue DESC
The query failed failed with the error:
Resources exceeded during query execution: The query could not be executed in the allotted memory. ORDER BY operator used too much memory..