Access Query Help

AuthorityActionAuthorityAction Missouri Member
edited January 2009 in Science & Tech
I am trying to crank out a simple Access database that details the courses that students are taking in the building I live in. What I have is a list of the courses being taken all in one column like so:

CSC 333
PLS 101
COM 115
PLS 101
MTH 135
PLS 101
COM 115

What I would like to get out of this information is the number of times each course is being taken, so from this data I would get the following from some query:

PLS 101 - 3
COM 115 - 2
CSC 333 - 1
MTH 135 - 1

Thanks for any help!

Comments

  • SnarkasmSnarkasm Madison, WI Icrontian
    edited January 2009
    You have that kind of access to information on your building's tenants? Whoa.
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited January 2009
    I don't know the Access SQL syntax, but in MSSQL it would be
    something along the lines of
    select course, count(course) as CourseCount from coursetable group by course
    
  • AuthorityActionAuthorityAction Missouri Member
    edited January 2009
    Snarkasm wrote:
    You have that kind of access to information on your building's tenants? Whoa.

    I am a RA in the building and the residents voluntarily gave their class schedules to me. My goal is to figure out what the most popular class is so that we can get study nights setup with professors for those classes.
    Kwitko wrote:
    I don't know the Access SQL syntax, but in MSSQL it would be
    something along the lines of
    select course, count(course) as CourseCount from coursetable group by course
    

    Thanks for this, I am pretty sure I can change the syntax easily for Access.
  • SnarkasmSnarkasm Madison, WI Icrontian
    edited January 2009
    Oh awesome, good on you. Keep up the good work.
  • ThraxThrax 🐌 Austin, TX Icrontian
    edited January 2009
    He's really the next contestant on "To Catch a Predator."
  • WinfreyWinfrey waddafuh Missouri Icrontian
    edited January 2009
    He doesn't have my information!
  • RichDRichD Essex, UK
    edited January 2009
    If that is all you want to do with the data it may be easier to simply use the countif stament in Excel. Depends how many options you have.
  • CBCB Ƹ̵̡Ӝ̵̨̄Ʒ Der Millionendorf- Icrontian
    edited January 2009
    RichD wrote:
    If that is all you want to do with the data it may be easier to simply use the countif stament in Excel. Depends how many options you have.
    This is what I was thinking. Unless you have a lot more complicated things you want to do with this data later (and possibly even then) you might want to switch to a program that's not so stupidly complicated and couterintuitive as Access.
  • AuthorityActionAuthorityAction Missouri Member
    edited January 2009
    RichD wrote:
    If that is all you want to do with the data it may be easier to simply use the countif stament in Excel. Depends how many options you have.

    I had a similar thought as well. I have a lot more information on just my floor that I plan on trying to do some fancier stuff down the road. For now its a lot of work for something simple, but I think down the road it will make my life easier.
Sign In or Register to comment.