Sorry, I forgot to mention my table design, which is like this: name 2001 2002 2003 2004 2005 ----------------------------------------------------------------- Afghanistan .... Albania .... (Yep, I know, bad table design.... :-)). I tried to change it to the more common "id | year | value" format, but there were too many SQL problems afterwards for the different queries/calculations we need to have....) So, the mentioned SQL unfortunately doesn't work in that case.... Stef On Sep 27, 2007, at 1:52 PM, William Leite Araújo wrote: If I understood your question, maybe it's you want: |