Ask Question

Write an SQL statement that uses all of the SQL built-in functions on the Quantity-OnHand column. Include meaningful column names in the result.

+1
Answers (1)
  1. 27 August, 14:09
    0
    Query:

    select sum (QuantityOnHand) as "Total Quantity", count (QuantityOnHand) as "Total Quantity column", avg (QuantityOnHand) as "Average Quantity", max (QuantityOnHand) as "Maximum Quantity", min (QuantityOnHand) as "Minimum Quantity" from inventory;

    Explanation:

    The above SQL query holds all the SQL built-in functions. This type of function calculates the results like mathematics functions. There are 5 functions of these types which are as follows:-

    sum function is used to calculate the sum. count function is used to count the number of rows. min function is used to find the minimum value. max function is used to find the maximum value. avg function is used to find the average of the number.

    The above query also holds the as a keyword which is used to display the duplicate column name in the place of the original column name.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write an SQL statement that uses all of the SQL built-in functions on the Quantity-OnHand column. Include meaningful column names in the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers