SELECT DISTINCT SUBSTRING_INDEX(toets_formula, '_', 1), (SUBSTRING(toets_formula, 1, 1) - 3)*3, SUBSTRING(toets_formula, 2, 1), subj_id FROM `toetsen` JOIN kldv.subj ON toets_vak = subj_abbrev WHERE `file_id` = 59 AND SUBSTRING(toets_formula, 1, 2) IN ( '4H', '4V', '5V' ) AND (toets_formula LIKE '%ST%' OR toets_formula LIKE '%SE%')