Question
Consider a table Orders with columns OrderID, CustomerID, OrderDate, and TotalAmount. Which SQL query would correctly find the total number of orders and the average TotalAmount for each CustomerID who has placed more than 5 orders? Option
- A SELECT CustomerID, COUNT(OrderI
- B SELECT CustomerID, COUNT(OrderI
- C SELECT CustomerID, COUNT(OrderI
- D , AVG(TotalAmount) FROM Orders GROUP BY CustomerID WHERE COUNT(OrderI
- D > 5; Option
- D , AVG(TotalAmount) FROM Orders WHERE COUNT(OrderI
- D > 5 GROUP BY CustomerID; Option
- D , AVG(TotalAmount) FROM Orders GROUP BY CustomerID HAVING COUNT(OrderI
- D > 5; Option
- D SELECT CustomerID, COUNT(OrderI
- D , AVG(TotalAmount) FROM Orders HAVING COUNT(OrderI
- D > 5 GROUP BY CustomerID; Option
- E None of the above
More C Programming Questions
- In C, what is the output of printf("%d", 5/2);?
- What is the output of the following C++ code? #include using namespace std; int main() { int x = 5; int &ref = x; ref = 10; int ...
- Which of the following is true about MergeSort?
- Which Python keyword is used to handle exceptions?
- In Python, which method is used to convert a string to lowercase?
- Which of the following is used to handle exceptions in Java?
- In C++, a base class pointer holds the address of a derived class object. The base class declares a non-virtual member function that the derived class rede...
- Which C operator is used to access a value at a memory address stored in a pointer?
- In Java, which data type is used to store true or false values?
- In Python, which of the following is used to create an anonymous function?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)