select distinct studentid from t2,t1 where 科目1>90 and 科目2>90 and 科目3>90 and t1.studentid=t2.studentid
Select 学生ID ,count(学生ID) as score from t1 group by 学生ID HAVING 成绩>90 and Count(学生ID) > 2
SELECT 查询11.学生ID, t2.姓名 FROM t2 INNER JOIN (SELECT t1.学生ID, Count(t1.成绩) AS 成绩之Count FROM t1 WHERE (((t1.成绩)>90)) GROUP BY t1.学生ID HAVING (((Count(t1.成绩))>=3))) 查询11 ON t2.学生ID = 查询11.学生ID;
SELECT 查询11.学生ID, t2.姓名 FROM t2 INNER JOIN (SELECT t1.学生ID, Count(t1.成绩) AS 成绩之Count FROM t1 WHERE (((t1.成绩)>90)) GROUP BY t1.学生ID HAVING (((Count(t1.成绩))>=3))) 查询11 ON t2.学生ID = 查询11.学生ID;
select b.学生ID,b.姓名 from ( select 学生ID,科目,account = sum((case when 成绩 > 90 then 1 else 0 end)) from t1 group by 学生ID,科目) a, t2 b where a.account >=3 and a.学生ID = b.学生ID
from t2,t1
where 科目1>90 and 科目2>90 and 科目3>90 and t1.studentid=t2.studentid
Select 学生ID ,count(学生ID) as score from t1 group by 学生ID HAVING 成绩>90
and Count(学生ID) > 2
FROM t2 INNER JOIN (SELECT t1.学生ID, Count(t1.成绩) AS 成绩之Count
FROM t1
WHERE (((t1.成绩)>90))
GROUP BY t1.学生ID
HAVING (((Count(t1.成绩))>=3)))
查询11 ON t2.学生ID = 查询11.学生ID;
FROM t2 INNER JOIN (SELECT t1.学生ID, Count(t1.成绩) AS 成绩之Count
FROM t1
WHERE (((t1.成绩)>90))
GROUP BY t1.学生ID
HAVING (((Count(t1.成绩))>=3)))
查询11 ON t2.学生ID = 查询11.学生ID;
from ( select 学生ID,科目,account = sum((case when 成绩 > 90 then 1 else 0 end))
from t1
group by 学生ID,科目) a, t2 b
where a.account >=3 and a.学生ID = b.学生ID