Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: hoos1
  • Order by date
  1. hoos1

    Nested aggregate function

    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.
  2. hoos1

    Nested aggregate function

    Jim, <br><br>The count function with a group by is going to return a single value for each student, as you've displayed.&nbsp;&nbsp;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...
  3. hoos1

    Nested aggregate function

    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.&nbsp;&nbsp;
  4. hoos1

    Nested aggregate function

    Could you be a little more specific.&nbsp;&nbsp;If I could write a query that performs what I want, I would have written it.&nbsp;&nbsp;Where does copying and pasting come in.<br><br>BTW: My table consists of a two part primary key - student_no and class_no.&nbsp;&nbsp;I'm trying to find the...
  5. hoos1

    Nested aggregate function

    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>&nbsp;from class<br>&nbsp;group by student_no<br>&nbsp;having count(*) = <br><br>(Select min(count(*))<br>&nbsp;&nbsp;from class<br>&nbsp;&nbsp;group by...
  6. hoos1

    Nested aggregate function

    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>&nbsp;from class<br>&nbsp;group by student_no<br>&nbsp;having count(*) = <br><br>(Select min(count(*))<br>&nbsp;&nbsp;from class<br>&nbsp;&nbsp;group by...

Part and Inventory Search

Back
Top