SELECT
    warpSkyCellMap.*,
    chipProcessedImfile.uri,
    chipProcessedImfile.path_base as chip_path_base,
    camProcessedExp.path_base as cam_path_base
FROM warpRun
JOIN warpSkyCellMap
    USING(warp_id)
JOIN fakeRun
    USING(fake_id)
JOIN camRun
    USING(cam_id)
JOIN camProcessedExp
    USING(cam_id)
JOIN chipRun
    USING(chip_id)
JOIN chipProcessedImfile
    ON chipRun.chip_id = chipProcessedImfile.chip_id
    AND warpSkyCellMap.class_id = chipProcessedImfile.class_id
WHERE
--    warpRun.state = 'run'
    fakeRun.state = 'stop'
    AND camRun.state = 'stop'
    AND chipRun.state = 'full'
