> > Return only four rows beginning at second row:
> >
> > SELECT count(*) AS count, name, year FROM a
> > GROUP BY name, year
> > ORDER BY count DESC, name ASC
> > LIMIT 4 OFFSET 1;
> >
> > count name year
> > --- -- --
> >3 joe2004 s,e,e
> >2 bob20
[EMAIL PROTECTED] wrote on 01/17/2005 06:45:22 PM:
> Hi there:
>
> I have a "How do I..." SQL question regarding selecting
> distinct values from a field not included in an aggregated
> query when LIMIT is in effect, illustrated by the
> following example:
>
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> SELECT DISTINCT place FROM a ;
> place
> ---
> south
> west
> east
> Note that the place north does not appear in the last result
> because north was only visited by bob in 2005 and kim in 2004,
> records which are not i
Can't you do:
SELECT count(*) AS count, name, year FROM a
WHERE place IN ('south','west','east')
GROUP BY name, year
ORDER BY count DESC, name ASC
LIMIT 4 OFFSET 1;
[EMAIL PROTECTED] wrote:
Hi there:
I have a "How do I..." SQL question reg
Hi there:
I have a "How do I..." SQL question regarding selecting
distinct values from a field not included in an aggregated
query when LIMIT is in effect, illustrated by the
following example:
Table a contains the names of individuals, the places
they have visited and the year in