必要な情報を取得するためのクエリを作成するのに苦労しています。下記参照:
テーブルの顧客
CustId CustName
1 Andy
2 Rob
3 Craig
4 Rashi
テーブル顧客注文
CustId OrderQuantity
1 3
2 5
3 10
1 2
必要な出力:
CustId CustName NumberofOrdersPlaced
1 Andy 5
2 Rob 5
3 Craig 10
4 Rashi 0
aCustomer
が注文していない場合は、NumberofOrdersPlaced
を0に設定する必要があります。
私はこの単純なクエリに苦労しています。誰か助けてください。