Re: VB Help
// select tests where more than 10 students are present
SELECT COUNT(*) AS StudentCount, test_ID, test_Date FROM Student_Test WHERE StudentCount > 10 GROUP BY test_ID, test_Date
// get the nr of open slots for every test... this should work in a JET database (MS Access). I don't know if your DB allows the 10-COUNT(*)
SELECT (10 - COUNT(*)) AS OpenSlots, test_ID, test_Date FROM Student_Test WHERE 1 GROUP BY test_ID, test_Date
__________________
"Yay"
|