# HG changeset patch # User Felix Wolfsteller # 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