DELETE FROM skycalResult
USING skycalResult, skycalRun, stackRun
WHERE skycalRun.skycal_id = skycalResult.skycal_id
    AND stackRun.stack_id = skycalRun.stack_id
    AND skycalRun.state = 'new'
    AND skycalResult.fault != 0
