Switched query to Case + case_tube_idx based