Hi, Mark,

Mark Woodward wrote:
> Shouldn't this work?
> 
> select ycis_id, min(tindex), avg(tindex) from y where ycis_id = 15;
> 
> ERROR:  column "y.ycis_id" must appear in the GROUP BY clause or be used
> in an aggregate function
> 
> If I am asking for a specific column value, should I, technically
> speaking, need to group by that column?

Try:

SELECT 15 as ycis_id, min(tindex), avt(tindex) from y where ycis_id = 15;

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to