Im using Access 2010, working in an ADP-file. I have extracted some tables from a sql-database. Then I have made a View where want to extract som data. What I have to do is make a view of number of students and years grouped by year and sorted by count of student each year but it doesnt work.
If you look at the View I have made you can see that it is grouped by Immaar (means year) but not sorted by Count in descending order (it is count of studentID. Each student has his/her own ID).
What i want to have in view is this:
My code is this:
SELECT TOP 100 PERCENT Immaar, COUNT(StudentID) AS Number
GROUP BY Immaar
ORDER BY COUNT(StudentID) DESC