I have a sql which is:
SELECT
COUNT(CustomerID), Country
FROM
Customers
GROUP BY Country
HAVING COUNT(CustomerID) > 5
ORDER BY COUNT(CustomerID) DESC;
I dont know the sequence of how execution goes in order from Select to OrderBy.So,i gave number as 1,2,3,4 to get the sequence of execution. So,I think:
SELECT
(4)COUNT(CustomerID), Country
FROM
Customers
(1)GROUP BY Country
(2)HAVING COUNT(CustomerID) > 5
(3)ORDER BY COUNT(CustomerID) DESC;
Is,it right or wrong?If,I am wrong please correct it.