Re: duration query: how to ?

2006-05-18 Thread John Hicks
Bedford Bob wrote: I'd like to retrieve the total amount of time the articles have been in the site from 2005-01-01 to 2005-01-31 and divide them by 365 (or 366 if leap year). if an article has been online from 2004-10-01 to null (meaning the article hasn't been sold yet) then I may count 365 da

Re: duration query: how to ?

2006-05-18 Thread Peter Brawley
Bob >I'd like to retrieve the total amount of time the articles have been in the >site from 2005-01-01 to 2005-01-31 and divide them by 365 (or 366 if leap >year). In a valid-time app like yours, it is usually more sound to mark "current" with a far-in-the-future date than with NULL. Arguably

Re: duration query: how to ?

2006-05-18 Thread Barry
Bedford Bob schrieb: Hi, My clients can put their articles on my website. They pay for the real utilisation of the site. If a client has used 2 slots for all year, then he pays for them. Now my articles table has a starddate (when the client has started to sell his product) and an enddate (when

duration query: how to ?

2006-05-18 Thread Bedford Bob
Hi, My clients can put their articles on my website. They pay for the real utilisation of the site. If a client has used 2 slots for all year, then he pays for them. Now my articles table has a starddate (when the client has started to sell his product) and an enddate (when the article is sold).

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: Query How To

2005-04-18 Thread SGreen
"Reynier Perez Mira" <[EMAIL PROTECTED]> wrote on 04/18/2005 10:44:39 AM: > Hi list > > I need to make a Quero that select all fields in wich the date are > inferior in 10 days to actual date. Something like this: > > Actual date: 18-04-2005 > > Select all fields in which are bigger than: 08-

Query How To

2005-04-18 Thread Reynier Perez Mira
Hi list I need to make a Quero that select all fields in wich the date are inferior in 10 days to actual date. Something like this: Actual date: 18-04-2005 Select all fields in which are bigger than: 08-04-2005. How can I do this? Regards Reynier Pérez Mira 3ero. Ing. Informática Ent

Query how to??

2003-12-06 Thread Johan Driesmans
Hi, I'm having problems to make a query. Situation: One table with data: JobID,Year,Week,Place,Name 1,2003,1,Place1,Person1 2,2003,1,Place2,Person2 3,2003,2,Place1,Person3 4,2003,2,Place2,Person4 5,2003,3,Place1,Person2 6,2003,3,Place2,Person6 7,2003,3,Place3,Person5 8,2003,4,Place1,Person1 9,

Re: Creating a table from a query/How to?.....

2002-05-09 Thread Arjen Lentz
Hi Tim, On Fri, 2002-05-10 at 11:53, Tim Johnson wrote: > I'm not usually this lucky, but it seems that the trick is > to let mysql do more of the work, and I'm happy to go > along with that: > What I needed is > CREATE TABLE EurCount SELECT DISTINCT Country FROM EUR; >

Re: Creating a table from a query/How to?.....

2002-05-09 Thread Tim Johnson
Hello Again: I'm not usually this lucky, but it seems that the trick is to let mysql do more of the work, and I'm happy to go along with that: What I needed is CREATE TABLE EurCount SELECT DISTINCT Country FROM EUR; (with EurCount being nonexistant) I would appr

Creating a table from a query/How to?

2002-05-09 Thread Tim Johnson
Hello: Am using Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386) on RH 7.2. I would like to construct a mysql command that select a unique set of data from one table and creates a table with that data. I think I'm close here, but am still getting errors: The query string i