Commit dfb204b9 authored by Rune Åvar Ødegård's avatar Rune Åvar Ødegård
Browse files

Added OUTER JOIN eea_times on processes

parent 85c6e8a8
......@@ -6,7 +6,7 @@ class ProcessesHandler:
@staticmethod
def handle():
sql = """
SELECT
SELECT
pr.id,
pr.measurement_type,
pr.measurement_method,
......@@ -34,8 +34,8 @@ class ProcessesHandler:
mt.label as measurement_type_name,
mm.label as measurement_method_name,
me.label as measurement_equipment_name,
tm.label as duration_unit_name,
tm.label as cadence_unit_name,
tm_d.label as duration_unit_name,
tm_c.label as cadence_unit_name,
ra.name as responsible_authority,
ed.label as equiv_demonstration_name,
ct.notation as detection_limit_uom_name
......@@ -46,11 +46,9 @@ class ProcessesHandler:
LEFT OUTER JOIN eea_measurementequipments me ON lower(pr.measurement_equipment) = lower(me.id)
LEFT OUTER JOIN eea_equivalencedemonstrated ed ON lower(pr.equiv_demonstration) = lower(ed.id)
LEFT OUTER JOIN responsible_authorities ra ON lower(pr.responsible_authority_id) = lower(ra.id)
LEFT OUTER JOIN eea_concentrations ct ON lower(pr.detection_limit_uom) = lower(ct.id),
eea_times tm
WHERE
lower(pr.duration_unit) = lower(tm.id)
and lower(pr.cadence_unit) = lower(tm.id);
LEFT OUTER JOIN eea_concentrations ct ON lower(pr.detection_limit_uom) = lower(ct.id)
LEFT OUTER JOIN eea_times tm_d ON lower(pr.duration_unit) = lower(tm_d.id)
LEFT OUTER JOIN eea_times tm_c ON lower(pr.cadence_unit) = lower(tm_c.id)
"""
processes = Db.fetchall(sql)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment