By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,574 Members | 1,977 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,574 IT Pros & Developers. It's quick & easy.

Data Manipulation

P: 5
I'm new to SQL and will be running what seems to me like quite a complex set of queries.

I'm sorry for what will probably be quite a confusing explanation.

I have a database which keeps track of measurements on items. I want to be able to extract all of the information for the last 30 items and analyse the data.
For each measurement I want to know the maximum and minimum value recorded, the number out of tolerance, the percentage of features out of tolerance in the day, the number of parts in a day with no features out of tolerance, the time between each item being measured as well as outputting all of the data and colour coding cells depending on whether they're in tolerance.

Is any of this possible, and if so how could i do it?

I'm trying to figure out the tolerance bits and have:
__________________________________________________ ____


FROM Database

WHERE Feature = 'feature1' AND Actual BETWEEN Upper_Tol AND Upper_Tol - ((Upper_Tol - Lower_Tol)/4) OR Feature = 'feature1' AND Actual BETWEEN Lower_Tol AND Lower_Tol + ((Upper_Tol - Lower_Tol)/4)

ORDER BY Date, Time
__________________________________________________ ____

However I don't know how to use Top 30 with this query, nor do I know if this would work.

Thank you for your help on any part of this task.
Mar 10 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 2,878
Could you post some sample data and how you want your result look like?

-- CK
Mar 10 '09 #2

P: 5
Here's an example of the database format and the output.

Thank you for your help
Attached Files
File Type: zip (11.9 KB, 22 views)
Mar 11 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.