Computer Science Homework Solutions
Problem
#176041

SQL - Fuel per hour

see attachment

Modify the query in Problem 1 above to include the computed (derived) attribute “fuel per hour.” (Hint: It is possible to use SQL to produce computed “attributes” that are not stored in any table. For example, the following SQL query is perfectly acceptable:
SELECT CHAR_DISTANCE, CHAR_FUEL_GALLONS/CHAR_DISTANCE
FROM CHARTER;
(The above query produces the “gallons per mile flown” value.) Use a similar technique on joined tables to produce the “gallons per hour” output shown in the figure below. (Note that 67.2 gallons/1.5 hours produces 44.8 gallons per hour.)

Attached file(s):
Attachments
query4.doc  View File

Solution Summary

Calculate gallons per hour

Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$7.98)
Included in Download
  • Plain text response
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Databases-derived attribute - Hi, What is derived attribute? Give an example. I require a detailed example and definition of this problem with referencing please. Regards,
  • Database Concept - How are relationships established?
  • Multivalued attributes - Hi, What two courses of action are available to designer encountering a multivalued attribute? Regards,
  • Composite Primary Keys - Under what circumstances would composite primary keys be appropriate? Provide examples.
  • The Relational Model and Data Normalization - 1. Define functional dependency and give an example. 2. What are insertion and deletions anomalies? 3. List and briefly describe first, second and third normal form. 4. Descri ...
Browse