Question: Can someone help with the below SQL question? I feel I was close, but I couldnt figure out how to have One entry for texas

Can someone help with the below SQL question?

I feel I was close, but I couldnt figure out how to have One entry for texas instruments to match its order of 217 in the Order_Detail table. Somehow I got 12,331 rows affected from a table that only had 307 rows??

Write a select statement that will display customer number, customer name and the number of orders belong to the customer. You will need to join two tables, use a COUNT aggregate and a GROUP BY clause in your SELECT statement. Override labels with a more descriptive but brief label.

msc_customer.cust_number AS Cust#, cust_name AS CustName, Count (MSC_Order_detail.ord_quantity) AS OrderQnty from MSC_Customer, MSC_Order_detail GROUP By MSC_Order_detail.ord_quantity, cust_number, cust_name

;

(12331 row(s) affected)

Can someone help with the below SQL question? I feel I was

K SQLC ery4, sold -u...(UPympn51 29 (112)) SQL Query 3.sq up Pr (70) SQL Query 2.sql u (UPVmpn5129 (134)* tity) As orderQnty from Msc customer, Msc order detail GROUP By Msc order detail.ord quantity, cust number, cust name c 100% Results Messages Cust# custName OrderQnty 1 1001 Texas Instruments 1 2 1001 Texas Instruments 1 3 1001 Texas Instruments 2 4 1001 Texas Instruments 1 Query executed successfully

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!