Bird
0
0

Which of the following is the correct syntax to calculate the total price from a table named Orders with a column Price?

easy📝 Syntax Q3 of 15
SQL - Aggregate Functions
Which of the following is the correct syntax to calculate the total price from a table named Orders with a column Price?
ASELECT Price SUM() FROM Orders;
BSELECT SUM FROM Orders(Price);
CSELECT SUM(Price) FROM Orders;
DSELECT SUM(Orders.Price);
Step-by-Step Solution
Solution:
  1. Step 1: Review correct SUM() syntax

    The correct syntax is SELECT SUM(column) FROM table;.
  2. Step 2: Check each option

    SELECT SUM(Price) FROM Orders; matches correct syntax. Others have misplaced parentheses or keywords.
  3. Final Answer:

    SELECT SUM(Price) FROM Orders; -> Option C
  4. Quick Check:

    SUM() syntax = SELECT SUM(column) FROM table [OK]
Quick Trick: SUM() needs column inside parentheses [OK]
Common Mistakes:
MISTAKES
  • Misplacing parentheses
  • Using SUM without column
  • Incorrect function call order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes