Re: Only show things that have count > 1 subquery not working to limit results
,COUNT(*) as frequency
COUNT(*) > 1
The 'having' clause is an easy way to filter based on an aggregate.
--- In SQLQueriesNoCode@yahoogroups.com, Charles Carroll <911@...> wrote:
> select COUNT(*) as frequency from sometable AS frequency group by
> LogValue order by frequency desc
> works fine
> select COUNT(*) as frequency from sometable where (select COUNT(*)
> from LogRaw)>1 group by LogValue order by frequency desc
> prouduces identical results i.e. it always returns all results and
> does not skip the the results that only have a count of 1
> what am I getting wrong in the subquery?