Re: Help with this query

2008-01-15 Thread Moon's Father
You can just use function sum to get what you want. On Jan 16, 2008 6:23 AM, Imran <[EMAIL PROTECTED]> wrote: > Hi: > > > > I have a table that I need help to summarize the data. I need to be able > to > create one row of data for custno + prodno + period + weekno combination > summarized by Invt

Help with this query

2008-01-15 Thread Imran
Hi: I have a table that I need help to summarize the data. I need to be able to create one row of data for custno + prodno + period + weekno combination summarized by Invtot. Any help will be greatly appreciated. Best regards I am attaching the relevant info below: Sales

Re: Help with this query. How to do a group by on a datetime just the month/day/year

2006-05-03 Thread BJ Swope
select count(*), substring(timeofclick,1,7) from MTracking where mallarea=1001 group by 2; On 5/3/06, Randy Paries <[EMAIL PROTECTED]> wrote: Hello, Not sure if i can do this. I have a table with a datetime column I would like to do group by a day of the month. if i do something like sel

RE: Help with this query. How to do a group by on a datetime just the month/day/year

2006-05-03 Thread George Law
try: group by substring(timeofclick,1,10) -Original Message- From: Randy Paries [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 11:25 AM To: mysql@lists.mysql.com Subject: Help with this query. How to do a group by on a datetime just the month/day/year Hello, Not sure if i

Help with this query. How to do a group by on a datetime just the month/day/year

2006-05-03 Thread Randy Paries
Hello, Not sure if i can do this. I have a table with a datetime column I would like to do group by a day of the month. if i do something like select count(*) from MTracking where mallarea=1001 group by timeofclick every one is listed because time. So is this possible? Thanks Randy -- MyS

RE: anyone help with this query? Returning tooooo many results

2004-07-09 Thread Aaron Wolski
] > Subject: RE: anyone help with this query? Returning to many results > > > Aaron, > > That would be an INNER JOIN situation: > > SELECT a.ID, a.First, a.Last, a.Email > FROM producta_customers a > INNER JOIN productb_customers b >ON a.email=b.email &g

RE: anyone help with this query? Returning tooooo many results

2004-07-09 Thread SGreen
07/09/2004 01:10 Subject: RE: anyone help with this query? Returning to many PM

RE: anyone help with this query? Returning tooooo many results

2004-07-09 Thread Aaron Wolski
gt; Subject: Re: anyone help with this query? Returning to many results > > > You have written a cross-product join. This is what happened but with a > much smaller example: > > Assume you have two tables: Colors and Sizes > > CREATE TABLE Colors ( > id int au

Re: anyone help with this query? Returning tooooo many results

2004-07-09 Thread SGreen
Fax to: 07/09/

Re: anyone help with this query? Returning tooooo many results

2004-07-09 Thread Philippe Poelvoorde
From the documentation mysql> SELECT table1.* FROM table1 ->LEFT JOIN table2 ON table1.id=table2.id ->WHERE table2.id IS NULL; will normally give you the right answer. and you should get : 2026 x 240 - 486,057 = 183 results Aaron Wolski wrote: Hi all, Having a problem with

Re: anyone help with this query? Returning tooooo many results

2004-07-09 Thread Alec . Cawley
"Aaron Wolski" <[EMAIL PROTECTED]> wrote on 09/07/2004 16:33:27: > Hi all, > > Having a problem with a query that's returning 486,057 results when it > most definitely should NOT be doing that. > > I have two tables: > > 1 for a list of customers that purchase product A, another for customers >

RE: anyone help with this query? Returning tooooo many results

2004-07-09 Thread Victor Pendleton
It sounds like a cartesian join. Have you run an explain plan on this query? What are you joining the two tables on? -Original Message- From: Aaron Wolski To: [EMAIL PROTECTED] Sent: 7/9/04 10:33 AM Subject: anyone help with this query? Returning to many results Hi all, Having a

Re: anyone help with this query? Returning tooooo many results

2004-07-09 Thread Martijn Tonies
Hi Aaron, > Having a problem with a query that's returning 486,057 results when it > most definitely should NOT be doing that. > > I have two tables: > > 1 for a list of customers that purchase product A, another for customers > who purchased product B. > > Columns are: > > Id > First > Last > Ema

anyone help with this query? Returning tooooo many results

2004-07-09 Thread Aaron Wolski
Hi all, Having a problem with a query that's returning 486,057 results when it most definitely should NOT be doing that. I have two tables: 1 for a list of customers that purchase product A, another for customers who purchased product B. Columns are: Id First Last Email I am trying to compare