Comprehension Passage

Answer the following 5 questions based on the passage. 

A company is implementing a new database system to manage its customer information. The database contains tables for customers, orders, products and sales representatives. Each customer can place multiple orders and each order can contain multiple products. Each order is associated with a specific sales representatives who manages the account. The database is designed to improve efficiency in tracking sales and customer interactions.

Which SQL query retrieves the total number of distinct customers who have placed orders ?

1
Select COUNT (DISTINCT customer_id) As total_customers From orders;
2
Select COUNT (*) As total_customers from customers;
3
Select COUNT (DISTINCT order_id) As total_customers from orders;
4
Select COUNT (DISTINCT customer_id) As total_customers from customers;

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation