Oops, I made a mistake the sub-selects should be item not sales...
> SELECT
> A1.location,
> ( select item ^^^^
> from sales
> where location = A1.location
> order by sales desc
> limit 1
> ) as TOP1,
> ( select item ^^^^
> from sales
> where location = A1.location
> order by sales desc
> limit 1 offset 1
> ) as Top2,
> ( select item ^^^^
> from sales
> where location = A1.location
> order by sales desc
> limit 1 offset 2
> ) as Top3
>
>
> FROM
> ( SELECT location
> from sales
> group by location
> ) AS A1
> ;
>
>
> Regards,
>
> Richard Broersma Jr.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>