MySQL Forums
Forum List  »  General

Re: Aggregate intraday data
Posted by: Rick James
Date: January 16, 2014 07:10PM

> 1) How to modify this query to get 100 daily aggregated rows?

SELECT @ago := `date` FROM F ORDER BY `date` DESC LIMIT 100,1;
SELECT ... WHERE `date` >= @ago ...;
(I may be off by 1.)

You will still get less than 100 rows if a symbol is 'new' or 'delisted' during the 100 days.

Options: ReplyQuote


Subject
Written By
Posted
January 15, 2014 10:16AM
January 15, 2014 11:33AM
January 16, 2014 03:24AM
January 16, 2014 07:15PM
January 17, 2014 04:56AM
January 17, 2014 02:25PM
January 30, 2014 06:49AM
Re: Aggregate intraday data
January 16, 2014 07:10PM
January 17, 2014 04:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.