On Wednesday 27 December 2006 17:12, Ashley M. Kirchner wrote:
> Chris Comparini wrote:
> > Try something like this:
> >
> > select hour(time) as the_hour, avg(temp_f) as average_temp_f
> > from data
> > where time > now() - interval 24 hour
> > group by the_hour;
>
> Thanks Chris. Questi
Chris Comparini wrote:
Try something like this:
select hour(time) as the_hour, avg(temp_f) as average_temp_f
from data
where time > now() - interval 24 hour
group by the_hour;
Thanks Chris. Question though, why is it that when I change that to
48 hours, it only gives me 24 results (s
On Wednesday 27 December 2006 16:24, Ashley M. Kirchner wrote:
>[...]
>
> I want to display a graph for the last 24 hours by averaging each
> hour. Since I get (at most) 60 readings per hour, I need to average
> them out to get a number for that hour. Do I have to do this averaging
> outside
Hi All,
I have a table that's described as follows:
++---+--+-+---++
| Field | Type | Null | Key | Default |
Extra |
++---+--+-+-
MySQL doesn't support TOP, however, there's a LIMIT syntax for MySQL that
roughly does the same thing:
http://www.mysql.com/doc/en/SELECT.html for a brief explanation.
In your example what you are looking for is:
SELECT DateCreatedField
FROM my_table
ORDER BY DateCreatedField DESC
LIMIT 10;
Hi,
I am trying to select the first 10 rows of a table by the date the
record was created. I have a date field in the table and I tried using
the TOP syntax of SELECT, but I keep getting syntax error.
SELECT TOP 10 DateCreatedField
FROM my_table
ORDER BY DateCreatedField DESCENDING
Does MySQL no
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
Hello Guys,
I have a char field, and I'd like to have select ordering it by lowercase
caracteres, uppercase caracters then special characters. I was reading about sort and
this seems to be related to charset of the server, and I dont have access to change
this.
I was thinking on
Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cindy
Sent: Tuesday, January 23, 2001 6:32 PM
To: [EMAIL PROTECTED]
Subject: question on select
OK, let's say I have two tables. The first is a table
full of people -- their names, address, phone numbers.
The s
PROTECTED]]
Sent: Wednesday, 24 January 2001 13:32
To: [EMAIL PROTECTED]
Subject: question on select
OK, let's say I have two tables. The first is a table
full of people -- their names, address, phone numbers.
The second table is an inventory, which among other things,
has a pointer to the first
OK, let's say I have two tables. The first is a table
full of people -- their names, address, phone numbers.
The second table is an inventory, which among other things,
has a pointer to the first table for who currently has possession
of the item.
so I select from the two tables to print out a
13 matches
Mail list logo