March 24, 2011 at 10:11 am
Hi,
tbl_tick_datacolumns
date[date]
time_min[time]
time_sec[time]
exchange_id[int]
symbol_id[int]
bidprice1[float]
bidqty1[int]
askprice1[float]
askqty1[int]
tbl_exchangecolumns
exchange_id[int]
exchange_name[varchar]
tbl_symbolcolumns
symbol_id[int]
symbol_name[varchar]
I need to build a query that outputs the average midpoint in second buckets, by exchange, by symbol. Order by symbol in ascending time seconds.
I also need to a query that looks for missing data for a given date between the hours of 08:00 and 08:30.
Any ideas.
Thanks
March 24, 2011 at 11:20 am
Please provide runnable DDL to create your tables, some DML to create test data and your expected output. Also posting the queries you are working with now will help start teh conversation...i.e. show us that you have started the work on your own and are not just looking for someone to do your work for you.
Have a look at this article: http://www.sqlservercentral.com/articles/Best+Practices/61537/%5B/url%5D
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
March 25, 2011 at 2:09 pm
Take a look at average and grouping.
bobsp (3/24/2011)
I also need to a query that looks for missing data for a given date between the hours of 08:00 and 08:30.
This is a bit like saying "I need a query to find all the records that should be in my but aren't". Or the perennial favorite, "I need to find all the data that should be in the master table that isn't there".
As previously stated, you need to help us help you. Take a look at the link in my signature for details about to get the help and answers you want.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply