SELECT
    detNormalizedExp.*
FROM detRunSummary
JOIN detNormalizedExp
    USING(det_id,iteration)
WHERE
    ((detRunSummary.data_state = 'goto_cleaned'
      AND detNormalizedExp.data_state = 'full')
     OR (detRunSummary.data_state = 'goto_scrubbed'
      AND detNormalizedExp.data_state = 'full')
     OR (detRunSummary.data_state = 'goto_purged'
      AND detNormalizedExp.data_state = 'full')
     OR detNormalizedExp.data_state = 'goto_cleaned'
     OR detNormalizedExp.data_state = 'goto_scrubbed'
     OR detNormalizedExp.data_state = 'goto_purged')

