Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 2: Please write SQL Query for each statement below using the table schema.I

ID: 3737853 • Letter: P

Question

Part 2: Please write SQL Query for each statement below using the table schema.If you need any more information than this, please let me know.

BA likes to have a set of statistics about the system as follows:

The most active seller (the one who has offered the most number of items)

The most active buyer (the one who has bought the most number of items)

The most popular seller (the one who sold the most number of items)

The most expensive item sold ever

The most expensive item available

The cheapest item sold ever

The cheapest item available

Table Schema is here:

Seller SellerID Street # and Name Email Telephone Zip State ocity ?Credit Card Number Card Owner Name Card Exp. Date Username Password Owner SellerID Item Description Quantity New Explained Refubrished Owner Name Initial Price Bid Start Date *Bid End Date Bid Start Time "Bid End Time Pictures ItemID Pictures Buyer Name Telephone Email Street # and Name city State ozip Username Password Card Exp. Date Card Owner Name Card Number Bidder BuyerD ItemID

Explanation / Answer

The following is the results of your query of the database:

First Name Last Name Address City State
Joe Smith 83 First Street Howard Ohio
Mary Scott 842 Vine Ave. Losantiville Ohio
Sam Jones 33 Elm St. Paris New York
Sarah Ackerman 440 U.S. 110 Upton Michigan

To explain what you just did, you asked for the all of data in the EmployeeAddressTable, and specifically, you asked for the columns called FirstName, LastName, Address, City, and State. Note that column names and table names do not have spaces...they must be typed as one word; and that the statement ends with a semicolon (;). The general form for a SELECT statement, retrieving all of the rows in the table is:

SELECT ColumnName, ColumnName, ...
FROM TableName;

To get all columns of a table without typing all column names, use:

SELECT * FROM TableName;

Each database management system (DBMS) and database software has different methods for logging in to the database and entering SQL commands; see the local computer "guru" to help you get onto the system, so that you can use SQL.