Are following two SQLs equivalent, regarding performance? Which one is better?
SELECT name, COUNT(name) AS c
FROM student
GROUP BY name
ORDER BY c DESC
;
SELECT name, COUNT(name)
FROM student
GROUP BY name
ORDER BY COUNT(name) DESC
;
Are following two SQLs equivalent, regarding performance? Which one is better?
SELECT name, COUNT(name) AS c
FROM student
GROUP BY name
ORDER BY c DESC
;
SELECT name, COUNT(name)
FROM student
GROUP BY name
ORDER BY COUNT(name) DESC
;