[PATCH 2 of 2] issue1345: Sort sediment densities by year

Wald Commits scm-commit at wald.intevation.org
Mon Oct 28 12:15:19 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1382958886 -3600
# Node ID 6b8d9c001329d11ea09e39af37e9fa9baa52a87f
# Parent  d4024d245f4ed2620d7542216c1212325f00f233
issue1345: Sort sediment densities by year.

diff -r d4024d245f4e -r 6b8d9c001329 artifacts/doc/conf/meta-data.xml
--- 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>


More information about the Dive4elements-commits mailing list