Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want the Qlik script equivalent of :
SELECT TOP 1 [City]
, SUM([Amount]) As Amount
FROM Table
GROUP BY [City]
ORDER BY SUM(Amount) DESC;
table1:
select City,Amount from table;
noconcatenate
table2:
load city,sum(Amount) resident table1 group by city order by 2 desc;
drop table table1;
Thanks for your response. This however did not work, it is also missing in TOP 1 clause. I just want to have the City with the highest sales.
Have a look at e.g.
Similar question, so you should be able to adapt that to your scenario.
Thanks for the reference. It is closer but it is listing all other states. I just want only the state with highest sales.