select student_id,subject,score,exam_date
from scores
where exam_date = '2024-06-30' and subject = '英语'
having score between 100 and 110
order by score desc;
select exam_date,max(case when subject = '语文' then score else null end) as chinese_score,max(case when subject = '数学' then score else null end) as math_score,max(case when subject = '英语' then score else null end) as english_score
from scores
where student_id = 460093 and subject in('语文','数学','英语')
group by exam_date
order by exam_date;
select student_id,sum(score) as total_score
from scores
where exam_date = '2024-06-30' and subject in ('语文','数学','英语')
group by student_id
having sum(score) > 330;
select name,subject,class_code,graduate_date
from teachers
where (graduate_date between '1994-01-01' and '1997-12-31') and gender = 'f'
order by graduate_date;