クエリから一意の結果を取得するのに問題があります。ここで言及されているクエリは、一意の回答を返す代わりに、重複する値を 6 回表示します。一度だけ結果を取得するにはどうすればよいですか?
SELECT step1 . * , TIME_FORMAT( step2.insert_time, '%H:%i:%s' ) AS insert_time,
DATE_FORMAT( step2.insert_time, '%d-%b-%Y %h:%i:%s' ) tradate, b.batch_name,
a.student_rollno, a.student_name, sf.bif_code, sb.subject_name, s.stream_code,
c.class_code, dv.division_code,
CONCAT( faculty_fname, ' ', faculty_lname ) facultyname
FROM csm_batch b, csm_step1 step1
INNER JOIN csm_class c ON c.class_code = ClassID
LEFT JOIN csm_stream s ON s.stream_code = StreamID
LEFT JOIN csm_subject sb ON sb.subject_code = SubjectID
LEFT JOIN csm_subject_bif sf ON sf.bif_code = BifID
LEFT JOIN csm_division dv ON dv.division_code = DivID
LEFT JOIN csm_faculty ad ON ad.faculty_id = FacultyID
INNER JOIN csm_step2 step2 ON step2.SessionID = step1.SessionID
LEFT JOIN csm_student a ON a.student_nfc_code = step2.StudentID
WHERE 0 =0
AND step2.SessionID = '17f32204f8fe4c'
LIMIT 0 , 30