LOC: Difference from Baseline Open Database Query

Back to Database Queries
         
        SELECT
          "institution"."name",                                 -- anonymized name of institution
          "machine"."id",                                       -- anonymized name of machine
          "machineType"."model",                           -- type of machine
          "multileafCollimator"."model",                   -- HD or Millenium
          "output"."dataDate",                             -- time and date that data was collected
       -- "output"."analysisDate",                         -- time and date that data was analyzed
          "diffBaselineOpen"."section",                    -- section
          "diffBaselineOpen"."leafIndex",                  -- leaf number
          "diffBaselineOpen"."diffBaselineOpen_mm"                  -- difference from baseline open in mm
        FROM
          public."diffBaselineOpen",
          public."institution",
          public."machine",
          public."machineType",
          public."multileafCollimator",
          public."output"
        WHERE
              ("diffBaselineOpen"."outputPK" = "output"."outputPK")
          AND ("output"."machinePK" = "machine"."machinePK")
          AND ("machine"."institutionPK" = "institution"."institutionPK")
          AND ("machine"."machineTypePK" = "machineType"."machineTypePK")
          AND ("machine"."multileafCollimatorPK" = "multileafCollimator"."multileafCollimatorPK")
        ORDER BY
          "institution"."name",
          "machine"."id",
          "output"."dataDate",
		  "diffBaselineOpen"."section",
          "diffBaselineOpen"."leafIndex"
        ASC LIMIT 10;