Re: counting number of multiple occurances in a row

2008-08-16 Thread Dr.Ruud
Rob Dixon schreef: > Mr. Shawn H. Corey wrote: >> SELECT company, COUNT(*) >> FROM commitCurrent >> GROUP BY company; > > Someone else has personal standards for SQL! Thank you Shawn! Do you keep a list of them? I would write it as SELECT c.company , COUNT(*) AS n FROM commitCurrent

Re: counting number of multiple occurances in a row

2008-08-15 Thread Mr. Shawn H. Corey
On Fri, 2008-08-15 at 15:57 +0100, Rob Dixon wrote: > Mr. Shawn H. Corey wrote: > > > > SELECT company, COUNT(*) > > FROM commitCurrent > > GROUP BY company; > > Someone else has personal standards for SQL! Thank you Shawn! > > Rob > Personal standards? I find that to be an oxymoron and a lit

Re: counting number of multiple occurances in a row

2008-08-15 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > > SELECT company, COUNT(*) > FROM commitCurrent > GROUP BY company; Someone else has personal standards for SQL! Thank you Shawn! Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: counting number of multiple occurances in a row

2008-08-15 Thread Mr. Shawn H. Corey
On Fri, 2008-08-15 at 13:57 +0100, Pat Rice wrote: > hi > I would like know how to count multiple occurances in a sql query. > > eg. > > row would be: > tom, tom , tom, john,pat,pat > > and this would produce > tom 3 > john 1 > pat 2 > > > I've tried this but I am only gettting 1 back > select

counting number of multiple occurances in a row

2008-08-15 Thread Pat Rice
hi I would like know how to count multiple occurances in a sql query. eg. row would be: tom, tom , tom, john,pat,pat and this would produce tom 3 john 1 pat 2 I've tried this but I am only gettting 1 back select count(*) from commitCurrent where company =(select distinct company from commitCur