# HG changeset patch # User Raimund Renkert # Date 1403787244 -7200 # Node ID d66ea32d98bc9e0c103d436d068d1324aae51d91 # Parent 09c9920e6f24d49b1cf3d94d12aec920934beb97 Updated macros and db statement for minfo bedheight differences. diff -r 09c9920e6f24 -r d66ea32d98bc artifacts/doc/conf/meta-data.xml --- a/artifacts/doc/conf/meta-data.xml Thu Jun 26 12:54:31 2014 +0200 +++ b/artifacts/doc/conf/meta-data.xml Thu Jun 26 14:54:04 2014 +0200 @@ -1734,23 +1734,22 @@ FROM bed_height_single bhs JOIN bed_height_single_values bhsv ON bhsv.bed_height_single_id = bhs.id - WHERE bhs.river_id = ${river_id} - AND bhs.year BETWEEN ${year_from} AND ${year_to}), + WHERE bhs.river_id = ${river_id}), csta - AS (SELECT b1.id AS id1, + AS (SELECT b1.id AS b1id, b1.description AS b1desc, b1.year AS b1year, - b2.id AS id2, - b2.description AS b2desv, + b2.id AS b2id, + b2.description AS b2desc, b2.year AS b2year FROM sta b1 JOIN sta b2 ON b1.station = b2.station AND b1.id < b2.id) - SELECT id1, b1desc, b1year, - id2, b2desc, b2year + SELECT DISTINCT b1id, b1desc, b1year, + b2id, b2desc, b2year FROM csta - ORDER BY b1year, b2year + ORDER BY b1desc, b2desc @@ -1763,38 +1762,55 @@ - + - + - + - + - - - TODO: Better structure + + - A - B - - B - A - + + + + + + + + + + + + - +