Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country
HAVING COUNT(CustomerID) > 5;
If I have to use the same functionality in load statement as shown in above select statement , how can I do it?
I am asking this since having cannot be used in load statement and aggregate function cant be used with where clause
try this way
LOAD *
WHERE CustomerID > 5
;
LOAD Customer, count(CustomerID) as custid
RESIDENT custtable
WHERE OrderDate >= 20100101
GROUP BY Customer
Actually, you can use same query in Qlik as it is.
Slight change in "Chanty".
Load * where NoOfCustomers > 5;
Load COUNT(CustomerID) as NoOfCustomers, Country
FROM CustomersSource
GROUP BY Country;