Conditional Count on a field

前端 未结 8 1828
庸人自扰
庸人自扰 2020-11-28 06:55

If I had a table like this:

jobId, jobName, Priority

Whereby Priority can be an integer between 1 to 5.

Since I would need this que

8条回答
  •  一个人的身影
    2020-11-28 07:30

    Try this:

    SELECT Count(Student_ID) as 'StudentCount' 
    FROM CourseSemOne
    where Student_ID=3 
    Having Count(Student_ID) < 6 and Count(Student_ID) > 0;
    

提交回复
热议问题