Skip to content
Advertisement

Using Inner join and sorting records in descending order

I am working with two tables(student_class and class) in my database. I have a query below that shows class that have students. But it is not quite what I am looking for. How to display classes that have students but show the results so maximum seats is descending. Would count be needed?

Tables:

Student_class:

Class:

Advertisement

Answer

Just use an order by statement:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement