(Sorry I am new to this and I think I did it right?) I have a Table with "Enrollment" and "Capacity" and I am trying to figure out the percentage of classes are closed? By closed I mean Enrollment = Capacity and then taking THAT number of closed classes divided by the total number of classes.
EDIT: Here it is if anyone cares or let me know if I should delete this post
SELECT SUM( IIF(PerceentOfClassesClosed = "Closed", 1.0, 0.0) ) / COUNT(1)
FROM (SELECT IIF((Class.Enrollment / Class.Capacity) = 1, "Closed", "Open") AS PerceentOfClassesClosed FROM Class)