Ask Question
18 September, 13:07

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.

+2
Answers (1)
  1. 18 September, 16:08
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers