sql

image-20230524155624585

SELECT count(aa.sex) from (select DISTINCT * FROM s where sex='女') as aa;
select aa.subject,AVG(aa.score) FROM (SELECT * from s where sex='女')as aa GROUP BY subject;

image-20230524162835329

select * FROM s LEFT JOIN student_class on s.s_id=student_class.s_id HAVING c_name='一班' &&(score>80||score in (60,61,62))
posted @ 2023-05-24 16:28  冰柠檬檬  阅读(8)  评论(0编辑  收藏  举报