There is 2 tables called
Students
- stuID
- camID FK
Campus
- camID PK
- camName
I am trying to find the campuses with more than 4 students that include the camName, camID, (number of students)
This is what I got so far
SELECT
students.camID, campus.camName, SUM(students.stuID) as [count]
FROM
students
JOIN
campus ON campus.camID = students.camID
WHERE
[count] > 3
GROUP BY
students.camID, campus.camName
ORDER BY
[count]
All this gets me though is a error that 'Invalid comlumn name 'count'.