I need help with a MySQL query I have the following query
SELECT Class.class_id, class.subject_id, class.teach_id, class.tcode, subjects.aca_lvl, subjects.name FROM subjects, class, faculty WHERE subjects.sub_id = class.subject_id AND subjects.fac_id = faculty.FacID and faculty.hod = 2
and this works well. I would like to expand on this query and if class.subject_id is repeated in multiple records I would just like to return the distinct records, i.e. one unique class.subject_ID
anyone got any idea how I might do this???