tj11:
select sex,count(sex)
from t_athletes
group by sex;
tj12:
select name 姓名,TIMESTAMPDIFF(year,birthday,'2024-1-1') 年龄
from t_athletes
tj13:
SELECT *
FROM
t_athletes
WHERE
id
NOT IN (
SELECT
aid
FROM
t_match
WHERE
sid
IN (SELECT id FROM t_sport WHERE name like '%跑步'));
tj14:
select t_sport.name ,t_athletes.name,t_athletes.sex,t_athletes.birthday
from t_athletes join t_match on t_athletes.id=t_match.aid
join t_sport on t_match.sid=t_sport.id
where t_match.grade='第一名'