62,047
社区成员
发帖
与我相关
我的任务
分享
select distinct Count(pj.ProjectID) from OLTR_ExamTestPaper as etp
inner join (select distinct CourseID from OLTR_StudyStudentRCourse) as rc on etp.CourseID=rc.CourseID
inner join (select distinct CourseID from OLTR_StudySubjectRCourse) as src on etp.CourseID=src.CourseID
inner join (select distinct subjectid from OLTR_StudyProjectRSubject) as rs on src.SubjectID=rs.SubjectID
inner join (select distinct ProjectID from OLTR_StudyProject as pj on rs.ProjectID=pj.ProjectID and etp.PaperAgain=1
and (StartTime <= getdate() and getdate() <= Endtime )
where rc.tag<>1 and rc.CourseID not in(select distinct pr.CourseID
from OLTR_ExamPaperRecard as pr) and rc.StudentID='S08030012' and rs.ProjectID='P08120001'
select distinct Count(pj.ProjectID) from OLTR_ExamTestPaper as etp
inner join OLTR_StudyStudentRCourse as rc on etp.CourseID=rc.CourseID
inner join OLTR_StudySubjectRCourse as src on etp.CourseID=src.CourseID
inner join OLTR_StudyProjectRSubject as rs on src.SubjectID=rs.SubjectID
inner join OLTR_StudyProject as pj on rs.ProjectID=pj.ProjectID and etp.PaperAgain=1
and (StartTime <= getdate() and getdate() <= Endtime )
where rc.tag<>1 and rc.CourseID not in(select distinct pr.CourseID
from OLTR_ExamPaperRecard as pr) and rc.StudentID='S08030012' and rs.ProjectID='P08120001'