SELECT DISTINCT * FROM
     -- the subselect is so where criteria can be specified without knowing
     -- which table the field came from
    (SELECT
        camRun.cam_id,
        chipProcessedImfile.*,
        rawExp.exp_name,
        rawExp.camera,
        rawExp.telescope,
        rawExp.filelevel
    FROM camRun
    JOIN chipRun
--      ON camRun.chip_id = chipRun.chip_id
        USING (chip_id)
    JOIN chipProcessedImfile
--      ON camRun.chip_id = chipProcessedImfile.chip_id
        USING (chip_id)
    JOIN rawExp
      ON chipProcessedImfile.exp_id = rawExp.exp_id
    LEFT JOIN camProcessedExp
        USING(cam_id)
    LEFT JOIN camMask
        ON camRun.label = camMask.label
    WHERE
        camMask.label IS NULL) as foo
