Yes, first of all, put the courses in a different table.
Then setup a linking table between the people table and the courses table.
Then you can run counts on the linking table and join in data from the other tables as
required.
---mark
--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------
> -----Original Message-----
> From: Chris Lott [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 05, 2000 6:03 PM
> To: CF-Talk
> Subject: SOT: SQL question
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In a table something like this:
>
> userid, course
> john ethics
> john english
> mary english
> mary math
> mary bio
>
> I need to find
>
> a) which user has taken the most courses in total
> b) which course was taken the most often
>
> Ideas?
>
> c
>
> -----BEGIN PGP SIGNATURE-----
> Version: 6.5.8ckt http://irfaiad.virtualave.net/
> Comment: PGP Signed for message verification and/or encryption
> Comment: KeyID: 0xD68B61E851046CFD
>
> iQA/AwUBOd0ksNaLYehRBGz9EQJjVQCfUA600RImF5Y7NRoha4BGnHzrV/QAoKWx
> 9BIcf5UEne847/fTRg/Ryv/y
> =CpJ4
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message
to [EMAIL PROTECTED] with 'unsubscribe' in the body.