Jump to content

MySQL Query Question


SILNTBOB

Recommended Posts

I have a most likley very easy one to answer.

 

I am in the process of writing a PHP and MySQL program that converts a text file into an array and then dumps it into a database, I have that part working. For an example of the data I am working with here is a link to one of the text files.

 

http://themis.ssl.berkeley.edu/EPO_Access/files/ccnv/2008/thg_l2_mag_ccnv_20080101_v01.txt (~7mb)

Just need to load up a few lines to get a feel for it.

1st value is time in secs

2nd value is X

3rd value is Y

4th value is Z

 

I am loading each file in to a database that is layed out as Date, Time, X, Y, Z

I have a SQL query that will select the Max(x) Min(x) AVG(x) AVG(y) AVG (z) for each date.

 

What I need is to have it select three or four blocks of time and process those out separately per day.

 

I can post the PHP code I have right now if needed.

 

I can/would like to Figure out the if statements and while loops to get it to work pretty much just want the SQL statement that will grab, for example the AVG (x) for the time block of 0.408 - 32000.000 on the date of 20080101

 

Hope this can be done.

 

Thanks,

Clark Milholland

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.