Could you expand a little on how that works?
I am starting to think that I wont be able to get the results I need
without post processing.
Looking at the results:
...
| 2007-01-09 20:02:15 |
| 2007-01-09 20:02:15 |
| 2007-01-09 20:03:20 |
| 2007-01-09 20:08:33 |
| 2007-01-09 20:08:33 |
|
[EMAIL PROTECTED] (Paul Halliday) wrote in
news:[EMAIL PROTECTED]:
Could you expand a little on how that works?
USE test;
DROP TABLE IF EXISTS event;
CREATE TABLE event (timestamp DATETIME NOT NULL);
INSERT INTO event (timestamp) VALUES
('2007-01-09 20:02:15'),
('2007-01-09 20:02:15'),
Hi,
I am trying to deal with empty values so that I can graph data over a
24 hour period without gaps.
I created a table called HOURS which simply has 0-23 and I am trying
to do a join on this to produce the desired results. I think that the
DATE_FORMAT in the query is screwing things up.
The
Sent: Wednesday, January 10, 2007 8:39 AM
Subject: Strange query.
Hi,
I am trying to deal with empty values so that I can graph data over a
24 hour period without gaps.
I created a table called HOURS which simply has 0-23 and I am trying
to do a join on this to produce the desired results. I think
GROUP BY hour
- Original Message -
From: Paul Halliday [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, January 10, 2007 8:39 AM
Subject: Strange query.
Hi,
I am trying to deal with empty values so that I can graph data over a
24 hour period without gaps.
I created a table
Subject: Strange query.
Hi,
I am trying to deal with empty values so that I can graph data over a
24 hour period without gaps.
I created a table called HOURS which simply has 0-23 and I am trying
to do a join on this to produce the desired results. I think that the
DATE_FORMAT
Ugh. My perl isn't quite right there. Here's a bit better (e.g.
working) example:
If you create the table, then put this in populate_hours.pl:
BEGIN
#!/usr/bin/perl
$counter = 0;
while ($counter 100) {
print INSERT INTO all_hours (date_hour) VALUES (
DATE_ADD('2000-01-01 00:00:00',
group by HOURS.hour
Donna
Paul Halliday [EMAIL PROTECTED]
01/10/2007 09:48 AM
To
Brent Baisley [EMAIL PROTECTED]
cc
mysql@lists.mysql.com
Subject
Re: Strange query.
That query doesn't return empty values. Just to clarify what I want as
the result:
My initial query was this,
mysql
: Strange query.
e.c1?
Giving me errors..
On 1/10/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Try something like this:
SELECT
SUM(CASE when e.c1 is null then 0 else 1 end) as counts, HOURS.hour
FROM HOUR
LEFT OUTER JOIN (SELET sid, date_format(timestamp, '%H')as hr FROM
event
[EMAIL PROTECTED] (Paul Halliday) wrote in
news:[EMAIL PROTECTED]:
I am trying to deal with empty values so that I can graph data over a
24 hour period without gaps.
Have a look here:
http://forums.mysql.com/read.php?10,133603,133607#msg-133607
--
felix
--
MySQL General Mailing List
For
I did two query, can someone explain what happened?
First query:
mysql select * from customer_billing where first_name=shad;
+--+---++-+---+---+-
-+---+--+--+--+-
[snip]
I did two query, can someone explain what happened?
First query:
mysql select * from customer_billing where first_name=shad;
mysql select first_name, customer_num from customer_billing where
first_name=shad;
Now these query is the same except for the '*'?
[/snip]
On Fri, Apr 29, 2005 at 10:46:16AM -0500, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
I did two query, can someone explain what happened?
Not with what you included:
| customer_num | title | first_name | middle_name | last_name | email |
dayphone | evenphone | address1 |
Ahh okay the column was cut off or something \G shows it!
Thanks!!
-Original Message-
From: Rich Lafferty [mailto:[EMAIL PROTECTED]
Sent: Friday, April 29, 2005 10:28 AM
To: mysql@lists.mysql.com
Subject: Re: Can someone explain strange query!!
On Fri, Apr 29, 2005 at 10:46:16AM
Mysql 4.1.3
Windows XP SP1
All tables are InnoDB
The query (1):
select Product.id, LongAnswer.value, count(*)
from LongAnswer
inner join Answer on LongAnswer.answer=Answer.id
inner join QuestionDefinition on Answer.question=QuestionDefinition.id
inner join Survey on Answer.survey = Survey.id
inner
Hi, ppl!
I have a MySQL-server on FreeBSD-5.2.1 computer and a client on another
computer under windows xp.
I have the following simple query SELECT internal_number,page_no FROM
pages WHERE docs=307 ORDER BY page_no
that results in 587 lines with two integers only.
Simple query with low
Message-
From: Alex
To: [EMAIL PROTECTED]
Sent: 6/18/04 5:07 AM
Subject: strange query result
Hi, ppl!
I have a MySQL-server on FreeBSD-5.2.1 computer and a client on another
computer under windows xp.
I have the following simple query SELECT internal_number,page_no FROM
pages WHERE docs=307
Whilst trying to figure out why one of my queries wasn't working I ran into
the following phenomenon which I'd be grateful if someone could explain.
(I'm running mySQL 4.0.17 on a win2003 server, querying using the 0.9.4
mysql control center)
The following query returns the expected result
Linus Nikander wrote:
Whilst trying to figure out why one of my queries wasn't working I ran into
the following phenomenon which I'd be grateful if someone could explain.
(I'm running mySQL 4.0.17 on a win2003 server, querying using the 0.9.4
mysql control center)
The following query returns
Don't know if this has already come through to everyone, if so I apologize.
Ok, here's the deal
Table1 is a master list holding ID numbers, and related information sent by
clients
Table2 is a queue that utilizes Table1.ID numbers, and updates other
information on the current state of a job
I am encountering some strange behavior with the results returned from a
query on a table in MySQL. The query is:
select
t.lu_cn as cn,
sum(if(strcmp(t.work_item_type, 'OPERATIONS'),
t.reference_dollars_labor +
t.reference_dollars_equip +
On 14 Aug 2002, at 13:31, Sean C. Burbidge wrote:
The query is: select t.lu_cn as cn,
sum(if(strcmp(t.work_item_type, 'OPERATIONS'),
t.reference_dollars_labor +
t.reference_dollars_equip +
t.reference_dollars_travel +
t.reference_dollars_matl +
Hello all.
For my first post to the list, I have a very strange problem. (And yes,
I have perused the archives. I haven't found anything similar.)
Here's the situation:
I've got 6 machines that that make requests to a 7th machine, which is
running mysql-3.23.47. All the machines are
:07 PM
To: [EMAIL PROTECTED]
Subject: Strange query issues
Hello all.
For my first post to the list, I have a very strange problem.
(And yes,
I have perused the archives. I haven't found anything similar.)
Here's the situation:
I've got 6 machines that that make requests
select count(*) from members where country_id = 1 and read_array is NULL ;
Daren Cotter wrote:
can anybody explain this to me?
mysql select count(*) from members where country_id = 1 and read_array not
like '%20270%';
+--+
| count(*) |
+--+
|34884 |
+--+
can anybody explain this to me?
mysql select count(*) from members where country_id = 1 and read_array not
like '%20270%';
+--+
| count(*) |
+--+
|34884 |
+--+
mysql select count(*) from members where country_id = 1 and read_array like
'%20270%';
+--+
|
I would have to guess that you have a broken index.
bill
-Original Message-
From: Daren Cotter [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 3:50 PM
To: [EMAIL PROTECTED]
Subject: very strange query behavior
can anybody explain this to me?
mysql select count(*) from
27 matches
Mail list logo