diff artifacts/doc/conf/meta-data.xml @ 7451:6b8d9c001329

issue1345: Sort sediment densities by year.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 28 Oct 2013 12:14:46 +0100
parents d4024d245f4e
children cab749184ed7
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Mon Oct 28 11:52:14 2013 +0100
+++ b/artifacts/doc/conf/meta-data.xml	Mon Oct 28 12:14:46 2013 +0100
@@ -1252,11 +1252,14 @@
                 sd.id          AS sdid,
                 sd.description AS description,
                 d.lower        AS depth_lower,
-                d.upper        AS depth_upper
+                d.upper        AS depth_upper,
+                min(sdv.year)  AS year
             FROM     sediment_density sd
                 JOIN depths d ON sd.depth_id = d.id
+                JOIN sediment_density_values sdv on sdv.sediment_density_id = sd.id
             WHERE   sd.river_id = ${river_id}
-            ORDER BY depth_upper
+            GROUP BY sd.id, sd.description, d.upper, d.lower
+            ORDER BY year, depth_lower, depth_upper
         </dc:statement>
         <dc:if test="dc:has-result()">
           <dc:for-each>

http://dive4elements.wald.intevation.org