LOC: R Squared 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
          "rSquared"."section",           -- section
          "rSquared"."leafIndex",         -- leaf number
          "rSquared"."rSquared_mmsq"      -- R squared in square mm
        FROM
          public."rSquared",
          public."institution",
          public."machine",
          public."machineType",
          public."multileafCollimator",
          public."output"
        WHERE
              ("rSquared"."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",
		  "rSquared"."section",
          "rSquared"."leafIndex"
        ASC LIMIT 10;