February 10, 2011 at 11:06 am
Hi friends,
I am having a table that contains 100000.these are log file.among this depending upon fastest responce i have to find 90% records i.e. 900000 first and among this top 50 i have to display.
regards
Abhas.
February 10, 2011 at 11:18 am
what have you tried so far?
SQL supports the TOP command, ie
--last 90 days of data
SELECT TOP 50 ColumnList From MyLogTable Where SomeDate > dateadd(dd,-90,getdate())
Lowell
February 13, 2011 at 11:42 am
abhas (2/10/2011)
Hi friends,I am having a table that contains 100000.these are log file.among this depending upon fastest responce i have to find 90% records i.e. 900000 first and among this top 50 i have to display.
regards
Abhas.
This almost sounds like an interview question which is trying to figure out how you think.
Using a bit of Boolean logic, I'd normally say that means you only need to find the top 50 rows. However, your 90% requirement may be based on something else. Is the 90% requirement based on ANY top 90% or is there some criteria which must be met first?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2011 at 6:42 am
Thank u Lowell
But i need avarage upon time not on date.and time is in miliseconds.So i have to find largest 90% avarage from table.How can we do?
Regards
Abhas.
February 21, 2011 at 9:52 am
abhas (2/21/2011)
Thank u LowellBut i need avarage upon time not on date.and time is in miliseconds.So i have to find largest 90% avarage from table.How can we do?
Regards
Abhas.
details. show us a query that has the columns and tablenames.
show us what youve tried so far.
define the 90% group. 90% of what? peanut butter?
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply