Thank you, Peter! I'll give that a try.
~~Fish~~
On Fri, Dec 26, 2008 at 2:33 PM, Peter Brawley
wrote:
> Sorry LOL, make that http://www.artfulsoftware.com/infotree/queries.php.
>
> PB
>
> -
>
>
> Peter Brawley wrote:
>
> What I want to do is SELECT only the most recent dateTime and critte
Sorry LOL, make that http://www.artfulsoftware.com/infotree/queries.php.
PB
-
Peter Brawley wrote:
What I want to do is SELECT only the most recent dateTime and
critterXYZ for
each critterName and return one row for each unique critterName.
For examples & discussion see "Within-group ag
What I want to do is SELECT only the most recent dateTime and critterXYZ for
each critterName and return one row for each unique critterName.
For examples & discussion see "Within-group aggregates" at
http://localhost/artful/infotree/queries.php.
PB
-
Fish Kungfu wrote:
I have a datase
I have a dataset like this:
+++--+-+
|regionName|critterName|critterXYZ|dateTime
|
+++--+-+
|
2006 20:56
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: SELECT...GROUP BY WITHIN GROUP BY
I'm not sure that this is exactly what you want, but I think you can use
the WITH ROLLUP modifier:
select district, town, street, surname, count(surname)
from test5
group by distric
count the number of towns
at the end of each district report the district, no. of towns, no. of
streets, no. surnames
when all rows are processed report the no. of districts, no. of towns, no.
of streets, no. surnames
I was hoping to do this with a clever combination of SELECT, GROUP BY, etc.
OLLUP
http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html
Donna
"Kerry Frater" <[EMAIL PROTECTED]>
11/28/2006 02:31 PM
Please respond to
<[EMAIL PROTECTED]>
To
cc
Subject
SELECT...GROUP BY WITHIN GROUP BY
Hope I have the right group.
I am working out
Hope I have the right group.
I am working out how to get groups within groups. e.g.
I have a table with 4 columns C1,C2,C3 & C4
I am looking to select data so that I can get
C1 group item
C2 Group item
C3 Group Item
C4 detail
End of C3 Group Item
count/totals of
- Original Message -
From: "Wesley Furgiuele" <[EMAIL PROTECTED]>
To: "Alexander Newald" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 1:41 AM
Subject: Re: Get lines matching a select / group by query
Use COUNT():
S
Use COUNT():
SELECT COUNT( id ) FROM test WHERE LEFT( id, 5 ) = '12345' GROUP BY value;
Wes
On Tue, 21 Sep 2004 00:24:33 +0200, Alexander Newald
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I like to get the number of lines returned by a select ... group by query:
>
Hello,
I like to get the number of lines returned by a select ... group by query:
Example:
SELECT id FROM test WHERE LEFT(id,5) = "12345" GROUP BY value;
Perhaps I will get
+---+
| id|
+---+
| 2 |
| 1 |
| 5 |
+---+
3 rows in set
mailto:[EMAIL PROTECTED]
Sent: Monday, 8 March 2004 14:03
To: Darran Kartaschew; [EMAIL PROTECTED]
Subject: Re: SELECT ... GROUP BY
You need to do this in 2 steps.
Step 1:
select user_id, max(last_updated) as max_last_updated from posts group by user_id
You probably need to do this into a tem
Excellent, that worked...
Yours Sincerely
Darran
-Original Message-
From: Daniel Kasak [mailto:[EMAIL PROTECTED]
Sent: Monday, 8 March 2004 14:03
To: Darran Kartaschew; [EMAIL PROTECTED]
Subject: Re: SELECT ... GROUP BY
You need to do this in 2 steps.
Step 1:
select user_id, max
MySQL the proper place to do this stuff...
Darran
-Original Message-
From: Donny Simonton
Sent: Monday, 8 March 2004 13:49
To: Darran Kartaschew; [EMAIL PROTECTED]
Subject: RE: SELECT ... GROUP BY
You should change it to something like this:
Select * from posts group by user_id ord
Darran Kartaschew wrote:
Warning: SQL newbie...
I'm trying to create a query where the most recent entry for each user is returned from a forum table, and sorted by username. The fields are simply: user_id, username, post, last_updated. No primary key defined.
I've tried the simple "SELECT
; To: [EMAIL PROTECTED]
> Subject: SELECT ... GROUP BY
>
> Warning: SQL newbie...
>
> I'm trying to create a query where the most recent entry for each user is
> returned from a forum table, and sorted by username. The fields are
> simply: user_id, username, post, last_upda
Warning: SQL newbie...
I'm trying to create a query where the most recent entry for each user is returned
from a forum table, and sorted by username. The fields are simply: user_id, username,
post, last_updated. No primary key defined.
I've tried the simple "SELECT * FROM posts GROUP BY user_id
Thanks, Fred.
It works perfectly.
At 01:00 PM 2/11/2003 +0100, Fred van Engen wrote:
>Hello Anya,
>
>On Tue, Feb 11, 2003 at 07:51:00PM +0800, Anya wrote:
>>
>>
>> Dear all,
>> I have a table Kids which has the following fields:
>>
>> kid char(20),
>> favorite_fruits set('apple','pear','orange
Hello Anya,
On Tue, Feb 11, 2003 at 07:51:00PM +0800, Anya wrote:
>
>
> Dear all,
> I have a table Kids which has the following fields:
>
> kid char(20),
> favorite_fruits set('apple','pear','orange',)
>
> favorite_fruits has choices of up to 64 items.
>
> Now I want to query the count o
Dear all,
I have a table Kids which has the following fields:
kid char(20),
favorite_fruits set('apple','pear','orange',)
favorite_fruits has choices of up to 64 items.
Now I want to query the count of each fruit appears in the favorite_fruits of the kids
in the table. Is there anyway to
Hi.
On Tue, Oct 02, 2001 at 01:02:19PM +0100, [EMAIL PROTECTED] wrote:
> >Hi there. I have problems with mySQL
>
> >What I would like to do is:
>
> >I have a statement
>
> >SELECT a.id AS ID, IDmark, IDrecipe, ocenjevalec, ocena,
> >ROUND(AVG(ocena),1) as povprecje, COUNT(*) as all, IF (ID=oce
>Hi there. I have problems with mySQL
>What I would like to do is:
>I have a statement
>SELECT a.id AS ID, IDmark, IDrecipe, ocenjevalec, ocena,
>ROUND(AVG(ocena),1) as povprecje, COUNT(*) as all, IF (ID=ocenjevalec,
>'yes', 'no') as zeocenil
>FROM ocenerecepti, obiskovalci
>WHERE IDrecept = 13
22 matches
Mail list logo