RE: Group By Problem

2011-02-08 Thread Peter He
You need to group by event_text, not obj_text: select source_id ,event_text,count(*) from event_loc group by source_id,event_text; > Date: Tue, 8 Feb 2011 16:31:39 +0530 > From: adarsh.sha...@orkash.com > To: mysql@lists.mysql.com > Subject: Group By Problem > > Dear all, > > I stuck arou

Re: group by problem

2006-10-16 Thread chris smith
On 10/16/06, kalin mintchev <[EMAIL PROTECTED]> wrote: > > but that will get you all records for that category not just the most > recently updated. > that's the main problem, isn't it? what i'm looking for is the last record for EACH of the categories in the table. i'm aware of the aformentio

Re: group by problem

2006-10-16 Thread kalin mintchev
> > but that will get you all records for that category not just the most > recently updated. > that's the main problem, isn't it? what i'm looking for is the last record for EACH of the categories in the table. i'm aware of the aformentioned options. my problem with group by is that ignores th

Re: group by problem

2006-10-16 Thread Chris
kalin mintchev wrote: Basically you can't do what you want either without temporary tables or using a subselect. Subselects are only available in mysql 4.1+ (I think - check the docs) so that may or may not be an option. thanks... pardon my ignorance - how would i do that using subselects? Wi

Re: group by problem

2006-10-16 Thread kalin mintchev
> > Basically you can't do what you want either without temporary tables or > using a subselect. Subselects are only available in mysql 4.1+ (I think > - check the docs) so that may or may not be an option. thanks... pardon my ignorance - how would i do that using subselects? > -- MySQL Gen

Re: group by problem

2006-10-16 Thread Chris
kalin mintchev wrote: hi all... i have an issue with group by and ordering. apparently group by ignores 'order by id DESC'?! an example is a table that has an id and a category fields. there are a few categories under which records can be filed. so what i want is the latest record from each

Re: Group By Problem

2004-01-28 Thread Roger Baklund
* Lightware Software > Say I have the following table (TBL): > > KEY GRP VAL > 1 A 2 > 2 A 3 > 3 A 1 > > 4 B 2 > 5 B 1 > 6 B 3 > > "select KEY, max(VAL) from TBL group by GRP" gives: > > KEY max(VAL) > > 1 3 > 4 3 > > the desired result though is: > > KEY max(VAL) > ---

Re: Group by problem

2002-12-15 Thread Heikki Tuuri
Dmitry, - Original Message - From: "Dmitry Kosoy" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Sunday, December 15, 2002 7:11 PM Subject: RE: Group by problem > Hi, > > I checked it with 3.23.54 on Windows > and got the same incorrect result

RE: Group by problem

2002-12-15 Thread Dmitry Kosoy
Hi, I checked it with 3.23.54 on Windows and got the same incorrect results. Regards, Dmitry -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Group by problem Dmitry, - Original

Re: Group by problem

2002-12-12 Thread Heikki Tuuri
Dmitry, - Original Message - From: "Dmitry Kosoy" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, December 12, 2002 8:02 PM Subject: Group by problem > Hi, > > The following sql operators caused to incorrect results: > > CREATE TEMPORARY TABLE temp_list ( > CurrI

Re: GROUP BY problem.

2001-03-03 Thread Bob Hall
Sir, look up Rand and ORDER BY in the documentation. I believe there's an example of using Rand and ORDER BY to do this. Bob Hall >Thanks for the answer. but actually I'm not saying that mysql is doing >wrong, I just want to know HOW can I group by codigo and then get 10 random >rows of the gro

Re: GROUP BY problem.

2001-02-28 Thread Angel Behar
Thanks for the answer. but actually I'm not saying that mysql is doing wrong, I just want to know HOW can I group by codigo and then get 10 random rows of the grouped ones. Hope I explain me. Thanks again. > Angel Behar wrote: > > > > Hi !!! > > > > I'm running 3.23.28-gamma under windows NT,

Re: GROUP BY problem.

2001-02-28 Thread Gerald L. Clark
Angel Behar wrote: > > Hi !!! > > I'm running 3.23.28-gamma under windows NT, but I have the following > problem. > I need to query some data and gruop by some field (codigo in this case) so I > run the following query : > > SELECT codigo from ropa where cve_depto='3' AND cve_clase='06' AND a