Question

categories CategorylD INT(11) ◇ CategoryDescription VARCHAR( 75) Custom erID INT(11) CustFirstName VARCHAR(25) ◇CustLastName VARCHAR(25) ◇ CusstreetAddress VARCHAR(50) ◇ CustCity VARCHAR(30) ◇ Cusstate VARCHAR(2) order_details OrderNumber INT(11) ProductNum ber INT (11) QuotedPrice DECIMAL(15,2) QuantityOrdered SMALLINT(6) OrderNumber INT(11) ◇ OrderDate DATE ShipDate DATEK CustomerID INT(11) EmployeeID INT(11) CustzipCode VARCHAR( 10) custrea Code SMALLINT(6) ◇ CustphoneN umber VARCHAR(8) ProductNum ber INT (11) ProductName VARCHAR(50) ◇ ProductDescription VARCHAR(100) EmployeeID INT (11) ◇ EmpFirstName VARCHAR(25) ◇ EmpLastName VARCHAR( 25) RetailPrice DECMAL (15,2) ◇QuantityOnHand SMALLINT(6) Category/ID INT(11) EmpSteetAddress VARCHAR(50) ◇ EmpCity VARCHAR(30) EmpState VARCHAR() EmpZipCode VARCHAR(10) EmpAreaCode SMALLINT (6) VendorID INT(11) Vend Name VARCHAR(25) VendSteetAddress VARCHAR(50) Venda ty VARCHAR(30) Vend State VARCHAR( 2) vend ZipCode VARCHAR(10) ◇ EmpPhoneNumber VARCHAR(8) product_vendors ProductNum ber INT (11) t VendorID INT(11) ◆ WholesalePrice DECHAL(15,2) DaysToDeliver SMALLINT(6) product vendors ▼ EmpBirthDate DATE vend PhoneNumber VARGAR(15) ◇ VendFaxNumber VARCHAR(15) Vend WebPage TEXT ◇ Vend EMai!Address VARCHAR(50)Give the SQL statement that will find the vendor that provides that most products. Output the Vendor Name and the count of products.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

select v.vendorname, count(o.productnumber) from product_vendors as o
inner join vendors as v on v.vendorid = o.vendorid
having max(count(o.productnumber))

Add a comment
Know the answer?
Add Answer to:
Give the SQL statement that will find the vendor that provides that most products. Output the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 2 (60 points): You need the Sales OrdersExample database to complete this project. To install...

    Question 2 (60 points): You need the Sales OrdersExample database to complete this project. To install the database, first, download Data code 1 and run it, then download Data code 2 and run (provided on D2L). Now answer the following questions. 2.1: (20 Points) Use the customers' table inside of the salesordersexample database, and write a query statement to show records from the CustFirstName, CustLastName, and CustCity columns 2.2: (20 Points) Use the employees' table inside of the salesordersexample database,...

  • I need the SQL code to accomplish the following: Provide a list of orders that were...

    I need the SQL code to accomplish the following: Provide a list of orders that were created in January 2013.   Be sure to show the order number, date, employee name who took the order, and customer name who created the order. For all of the orders for 17” monitors in 2013, provide a list that shows the order number, date, and the quantity. here is the database CREATE DATABASE OrderEntryBMIS325 GO USE OrderEntryBMIS325 GO CREATE TABLE Customer ( CustNo CHAR(8),...

  • Please provide SQL command to provide the product names that customer number C0954327 ordered in January...

    Please provide SQL command to provide the product names that customer number C0954327 ordered in January 2013 here is the database: CREATE DATABASE OrderEntryBMIS325 GO USE OrderEntryBMIS325 GO CREATE TABLE Customer ( CustNo CHAR(8), CustFirstName VARCHAR(20) CONSTRAINT CustFirstNameRequired NOT NULL, CustLastName VARCHAR(30) CONSTRAINT CustLastNameRequired NOT NULL, CustStreet VARCHAR(50), CustCity VARCHAR(30), CustState CHAR(2), CustZip CHAR(10), CustBal Decimal(12,2) DEFAULT 0, CONSTRAINT PKCustomer PRIMARY KEY (CustNo) ) INSERT INTO Customer (CustNo, CustFirstName, CustLastName, CustStreet, CustCity, CustState, CustZip, CustBal) VALUES ( 'C0954327','Sheri','Gordon','336 Hill St.','Littleton','CO','80129-5543',$230.00...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT