Using the COUNT function in SQL

前端 未结 5 1086
猫巷女王i
猫巷女王i 2021-01-25 00:24

First and Foremost, this is part of an assignment.

I am trying to use the COUNT function as part of a query in relation to the Northwind database. The query should retur

5条回答
  •  萌比男神i
    2021-01-25 01:07

    The below query should work.

        SELECT Customers.CustomerID, Customers.CompanyName, COUNT(*)
        FROM Orders, Customers
        WHERE Customers.CustomerID = Orders.CustomerID group by Orders.CustomerID
    

提交回复
热议问题