Just to confirm, is amount2 for region 1 supposed to be 1630 (id 47) or 1955 (ids 13 & 47)?
Coz <snip> > What I would like to have is a result like this: > +--------+---------------------------+--------------+ > | region | sum(amount1) if current=J | sum(amount2) | > +--------+---------------------------+--------------+ > | 1 | 54800 | 1630 | > | 2 | 14075 | 640 | > +--------+---------------------------+--------------+ > > Many thanks in advance > Joachim > -- CozWeb Solutions Ltd http://www.cozweb.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]