Simple Query Question

2012-04-14 Thread Willy Mularto
Hi, Please help what is wrong with this simple query SELECT COUNT(key_agent) total FROM agents_consolidated WHERE total = 180 Thanks. Willy Mularto F300HD+MR18DE (NLC1725)

Re: Simple Query Question

2012-04-14 Thread Stefan Kuhn
On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: Hi, Please help what is wrong with this simple query SELECT COUNT(key_agent) total FROM agents_consolidated WHERE total = 180 Thanks. You need to use having instead of where, see the documentation. Stefan Willy Mularto F300HD+MR18DE

Re: Simple Query Question

2012-04-14 Thread Willy Mularto
Hi many thanks for the help :) On Apr 14, 2012, at 6:21 PM, Stefan Kuhn wrote: On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: Hi, Please help what is wrong with this simple query SELECT COUNT(key_agent) total FROM agents_consolidated WHERE total = 180 Thanks. You need to use

Fw: Simple Query Question

2012-04-14 Thread Abhishek Choudhary
, abhisehk choudhary www.tech4urhelp.blogspot.com From: Stefan Kuhn stef...@web.de To: mysql@lists.mysql.com Sent: Saturday, 14 April 2012 4:51 PM Subject: Re: Simple Query Question On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: Hi, Please help what

Simple Query Question

2009-12-17 Thread Ian
Hi, I am sure there is a simple solution to this problem, I just cant find it :) I have got a table that records views for an article for each blog per day. So the structure is as follows: CREATE TABLE `wp_views` ( `blog_id` int(11) NOT NULL, `post_id` int(11) NOT NULL, `date` date NOT NULL,

Re: Simple Query Question

2009-12-17 Thread Aleksandar Bradaric
Hi Ian, Why do you think something's wrong? Here is my test data and the results of your query: --- mysql SELECT * FROM wp_views; +-+-++---+ | blog_id | post_id | date | views | +-+-++---+ | 1 | 1 | 2009-12-16 |

Re: Simple Query Question

2009-12-17 Thread Ian
Hi, Thanks, I just checked and it was a memcache that was caching the output. See I knew it was a simple solution ;) Thanks for the effort everyone and sorry for wasting time. Regards Ian 2009/12/17 Aleksandar Bradaric leann...@gmail.com Hi Ian, Why do you think something's wrong? Here is

Simple query question

2004-09-20 Thread John Mistler
I have a table in which the first column is either 1 or 0. The second column is a number between 0 and 59. I need to perform a query that returns entries where: 1. IF the first column is 1, the second column is NOT 0 2. IF the first column is 0, the second column is anything. It seems simple,

Re: Simple query question

2004-09-20 Thread Roger Baklund
* John Mistler I have a table in which the first column is either 1 or 0. The second column is a number between 0 and 59. I need to perform a query that returns entries where: 1. IF the first column is 1, the second column is NOT 0 2. IF the first column is 0, the second column is

very simple query question

2004-04-17 Thread Randy Paries
Hello i have a simple query select u.*,p.* from users u, profiles p where u.uname = p.uname and u.level != 0 Is there any tricks to make this use an index. If i do level=0 is uses an index , but != does not. -- MySQL General Mailing List For list archives:

Re: very simple query question

2004-04-17 Thread Jigal van Hemert
i have a simple query select u.*,p.* from users u, profiles p where u.uname = p.uname and u.level != 0 Is there any tricks to make this use an index. If i do level=0 is uses an index , but != does not. MySQL only uses an index if it will return less than approx. 30% of the records. It

RE: simple query question

2002-09-13 Thread Meidling, Keith, CTR, OSD-C3I
I've seen a lot about 'InnoDB'. What is it? -Original Message- From: Weaver, Walt [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 4:09 PM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: simple query question I'd use the InnoDB table type and establish a primary

RE: simple query question

2002-09-13 Thread Iikka Meriläinen
PROTECTED]] Sent: Thursday, September 12, 2002 4:09 PM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: simple query question I'd use the InnoDB table type and establish a primary key/foreign key relationship (parent-child) between the two. That way referential integrity will be done

simple query question

2002-09-12 Thread Chris Burger
I have I hope a simple query question. I have two tables 1 One has customer id and a store id and transaction information 2 Second has a store id and store information There is multiple transactions in the first table, however there is only one record for each store id in the second

RE: simple query question

2002-09-12 Thread Weaver, Walt
: Thursday, September 12, 2002 1:57 PM To: [EMAIL PROTECTED] Subject: simple query question I have I hope a simple query question. I have two tables 1 One has customer id and a store id and transaction information 2 Second has a store id and store information There is multiple