Question 5
Question 5
ID, name, and number of orders placed by each customer. Sort the results in
ascending order of customer ID
A: To combine data from the `customers` and `orders` tables and retrieve
the customer ID, name, and number of orders placed by each customer, we
can use an `INNER JOIN` along with the `GROUP BY` clause to aggregate the
data. Here’s how you can write the SQL query:
```sql
FROM customers c
```
### Explanation:
- `FROM customers c`: Specifies the `customers` table as the primary table
(alias `c`).
This query will provide a list of customers along with the number of orders
they have placed, sorted by customer ID. If a customer has not placed any
orders, they will still appear in the results with a count of zero.