Column is invalid in select

前端 未结 4 1681
囚心锁ツ
囚心锁ツ 2021-01-26 10:51

How I will properly do this:

Customer

CusID, CusLname, CusFname, CusMname, CusAddress, CusEmailAdd

Order

OrderID,  Ord         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 11:55

    Just include them in the group by clause:

    Select  Count(OrderID), o.CusID, CusLname, CusFname, CusMname, CusAddress, CusEmailAdd
    From Customer c 
    Inner join
    Order o
    On c.CusID = o.CusID
    Group By o.CusID, CusLname, CusFname, CusMname, CusAddress, CusEmailAdd;
    

提交回复
热议问题