[PLUG] MSQL Cross-Table Query

D. Cooper Stevenson cooper at cooper.stevenson.name
Tue Mar 2 20:04:56 UTC 2010


On 03/02/10 09:40, Aaron Burt wrote:
> On Tue, Mar 02, 2010 at 08:14:57AM -0800, D. Cooper Stevenson wrote:
>   
>> I wrote, successfully,  a "date/time" query based on the tick data some
>> time ago. I suspected, through my reading of the documentation, that the
>> "narrowing of the fields--" so to speak--would be more complex than a
>> simple WHERE statement.
>>     
> By "narrowing of the fields", do you mean a left or outer join between the
> different stock tables?

I have to narrow the results between a start and end date. For example,
I may only need 5 weekdays of intraday tick data.

>   I assume one of the big problems is the missing
> samples, and possibly samples that don't fall on 0-second timestamps.
>   
I have complete data. The trouble is that I only want the close prices
from four of the tables that directly correspond to the date/time of the
first table.

For example, I want the close prices from msft, goog, aapl, and intc but
these results must match up with msft's date and time stamp. To say this
in English:

  "I want the close pricess for all four securities for 9:01:00 on
2009-01-02. Then I want the close prices for all four securities for
09:02:00 on 2009-01-02..." and so on.
>> Thank for your effort.
>>     
> I'm not seeing where you get your answer, did you give up on us?
>   
No way did I give up on you guys! I'll post a solution once I've struck
it. I'm seeing a lot of good feedback here--in fact I'm getting so much
that I have much to go through, keep it up!


Very Best,

Cooper Stevenson
--
ph: 541.971.0366
em: cooper at cooper dot stevenson dot name
www: http://cooper.stevenson.name




More information about the PLUG mailing list