sql - Multiple count() invocations with the same argument in one query -
suppose have table persons:
create table persons ( id integer, age integer, primary key (id) ); is there difference between following 2 queries?
query #1:
select age, count(*) persons group age order count(*); query #2:
select age, count(*) cnt persons group age order cnt; will first query count() twice, or optimized away query planner? depend on vendor or defined standard?

Comments
Post a Comment