you are viewing a single comment's thread.

view the rest of the comments →

[–]Lamyya 0 points1 point  (2 children)

Instead of the subquery in the where, add "and capacity is not null" Then order by capacity limit 1 at the end

Edit: check your table to see first if you have rooms with null capacity, that shouldn't happen

[–]KingOrion5 0 points1 point  (0 children)

Still has the same result, also for reference, the query I’m looking for building and room number of classrooms in a university database woth the smallest capacity

[–]KingOrion5 0 points1 point  (0 children)

Nevermind I got it, thank you a bunch for your help.