I had done it using two queries as well but my goal was to get it into one. Anyway, if you have any more ideas let me know. Thanks again for your help.
Jim, <br><br>The count function with a group by is going to return a single value for each student, as you've displayed. I now want to find the student that has taken the minimum number of courses. BTW: My table consists of a two part primary key - student_no and...
Thanks for your help, but do you have any idea how to only return the student number(s) that have the minimum count value. I'd rather not display all of the count records if possible.
Could you be a little more specific. If I could write a query that performs what I want, I would have written it. Where does copying and pasting come in.<br><br>BTW: My table consists of a two part primary key - student_no and class_no. I'm trying to find the...
I am trying to write a SQL statement that returns a record with the minimum count value for a table<br><br>Select student_no, count(*)<br> from class<br> group by student_no<br> having count(*) = <br><br>(Select min(count(*))<br> from class<br> group by...
I am trying to write a SQL statement that returns a record with the minimum count value for a table<br><br>Select student_no, count(*)<br> from class<br> group by student_no<br> having count(*) = <br><br>(Select min(count(*))<br> from class<br> group by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.