dbTalk Databases Forums  

Time based queries/views help

comp.databases.mysql comp.databases.mysql


Discuss Time based queries/views help in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Iain Adams
 
Posts: n/a

Default Time based queries/views help - 05-04-2011 , 05:42 AM






Hi,

I have a table that includes the following fields, ID, start date,
start time, end date, end time and it includes a huge amount of
records (50 million) each representing a transaction completed in a
system.

What I would like to achieve is a list of dates and times along with
the number of records that fell during that time period. For example.

April 1, 00:00 - 01:00, 12000
April 1, 01:00 - 02:00, 100
etc

Is this possible in mysql or will I need to write a script to
complete?

I hope someone is able to help.

Thanks,
Iain

Reply With Quote
  #2  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: Time based queries/views help - 05-04-2011 , 08:37 AM






Iain Adams wrote:
Quote:
Hi,

I have a table that includes the following fields, ID, start date,
start time, end date, end time and it includes a huge amount of
records (50 million) each representing a transaction completed in a
system.

What I would like to achieve is a list of dates and times along with
the number of records that fell during that time period. For example.

April 1, 00:00 - 01:00, 12000
April 1, 01:00 - 02:00, 100
etc

Is this possible in mysql
I would say yes, but is beyond my instant capabilities to construct the
query..but the tools are all their in terms of functins and 'group by'
clauses.



or will I need to write a script to
Quote:
complete?

I hope someone is able to help.

Thanks,
Iain

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.