On Oct 5, 2007, at 1:20 , Stefan Schwarzer wrote:
> Before I was used that the yearly values were all to be found in a
> single SQL row; now for each year of each country I have a separate
> row. How do I convert that into a single (HTML) row again?
Take a look at the crosstab functions in contrib/tablefunc.
> And the next question coming up is: How should my query look like
> so that I can sort the (HTML) table by a specific year in ascending
> or descending order? So, that it doesn't display it by the country
> names alphabetical order, but by, say 1998?
Same way you would otherwise -- ORDER BY -- after using crosstab.
Michael Glaesemann
grzm seespotcode net