Preview:
ALTER TABLE custom_tests_results
ADD COLUMN theme varchar(55);

select * from custom_tests_results a
join group_custom_tests b
on a.custom_test_id = b.id
join students c
on a.student_id = c.student_id
join subjects d
on a.subject_id = d.id
where a.custom_test_id = 24
and a.student_id = 585
and a.subject_id = 14

select distinct a.format, a.id, b.test_date
from group_custom_tests a
            join custom_tests_results b
            on a.id = b.custom_test_id
            where a.format = 'Второй' 
            and b.subject_id = 17

select * from group_subjects a
join subjects b
on a.subject_id = b.id
where a.group_id = 69

select * from custom_tests_results a
join subjects b
on a.subject_id = b.id
join students c
on a.student_id = c.student_id
where c.name = 'Кенебаев Манас'
and b.name = 'История Казахстана'
and custom_test_id = 24
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter