Thread: COUNT DISTINCT?
Folks, Anybody know a keen shortcut for the following: SELECT count(skip_date) FROM (SELECT DISTINCT skip_date FROM weekend_list WHERE ... ...) days_to_skip; That's a double aggregate, and is bound to be dog-slow. -- -Josh BerkusAglio Database SolutionsSan Francisco
On Tue, 30 Jul 2002, Josh Berkus wrote: > Folks, > > Anybody know a keen shortcut for the following: > > SELECT count(skip_date) > FROM (SELECT DISTINCT skip_date FROM weekend_list > WHERE ... ...) days_to_skip; > > That's a double aggregate, and is bound to be dog-slow. Would that be the same as: select count(distinct skip_date) from weekend_listwhere ...
Stephan, > Would that be the same as: > select count(distinct skip_date) from weekend_list > where ... Yeah, that would be what I was looking for. -- -Josh BerkusAglio Database SolutionsSan Francisco