Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Write a SELECT statement that will return the distinct
productid and productname from the products table. Join
this to the suppliers table and join on supplierid. Also join the
Order Details where the productid is equal. We will obtain
the productid from a subquery on order details when the
productid is greater than one. Order by productname and
productid. (This will return 76 rows)
Expert Solution
arrow_forward
Step 1
SQL query:
SELECT DISTINCT products.productid, products.productname, orders.order_details from products, suppliers, orders where products.supplierid=suppliers.supplierid AND products.productid=orders.productid order by productname AND productid;
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Reference table 6-28. Include both SQL commands and results/answers in your answers. In the NONCAT table, increase the price of each item in category BRD by five percent. (Hint: Multiply each price by 1.05.) In the NONCAT table, increase the length of the DESCRIPTION column to 40 characters.arrow_forwardThe Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table.arrow_forwardUsing the Winners table from Figure 12-2, write a parameter query that selects only an actor’s Picture field.arrow_forward
- Create a View to show the city name of any location that has a department. Only show the city name once in the results. You must use a non-correlated subquery.Call this view: Department_LocationsInclude a second query to display from the View after it is created. Refer to the attached for the table.arrow_forward15. Open the AttendeeFirstName query in Design View and add criteria to select only those records where the FirstName field value begins with Lau followed by any other letters. Save the changes to the query. Open the query in Datasheet View, confirm that two records appear in the query results, and then close it.arrow_forward1. Create a SELECT statement that returns the order number and date for all records in the ORDERS table. Using an inner join, include the customer name and email address associated with each order.arrow_forward
- Given the table PRODUCT(ProductID, ProductName, ProductClass, ProductWeight, ProductStyle, ProductColor, ProductPrice). Note: ProductWeight and ProductPrice are numeric fields, and the other attributes are character fields, i.e., store text. Write a SQL query to display the product class whose average price is at least 50arrow_forwardIn Structure Query Information Select all columns from the jobs table using an asterisk.2. Select only job title, min salary, and max salary columns from the jobs table.3. Select all columns from the d_partners table by writing out all of the columns inthe select statement.4. Using the d_partners table, display the id, and then concatenate the first_nameand last_name together with a space in between the two columns. Give theconcatenated column an alias of NAME. Be sure to use the optional ASkeyword.5. Using the job_grades table, show the grade level, and then subtract thelowest_sal from the highest_sal to show the amount of variance there is for eachgrade level. Give the calculated column an alias of Salary_Variance. Do notuse the optional AS keyword.6. Using the employees table, show an unduplicated list of department_id’s.7. Change the SELECT statement you built for question 4, adding a single columncalled Partner_Information that concatenates the partner’s…arrow_forwardThe InstantRide User Satisfaction team requires the average and maximum number of rides users have taken so far with InstantRide. In addition, they would like to know the total number of travels. However, they need these details with the corresponding column names Average, Maximum and Total by using the AVG, MAX and SUM functions. In order to accomplish this, you will first need to create a derived table from the TRAVELS table to pass the TRAVEL_ID count to the three mathematical functions.arrow_forward
- For this problem create a (temporary) table called instructor_course_nums. Write a procedure that accepts an instructor ID as input. The procedure calculates the total number of course sections taught by that instructor, and adds a tuple to the temporary table consisting of the instructors ID number, name, and total courses taught - call these attributes: ID, name, and tot_courses. If the instructor already has an entry in the table,then the procedure makes sure the total number of courses taught in the temporary table is up-to-date. You must name your procedure: Written in PostgreSQLarrow_forwardYou can create both Inner Join and Left Join on same Tableau File on different worksheet. Group of answer choices : True False In Techwear, the shipping number becomes the sales transaction number when the invoice is created, Group of answer choices : True Falsearrow_forwardLab #9 – Joining Data From Multiple Tables List the order number and order date for every order that was placed by Mary Nelson and that contains an order line for an iron. Use an INTERSECT operator. Lab #10 – Sub Queries Find the sales rep number, last name, and first name for every sales rep who represents at least one customer with a credit limit of $2000. List the order number and order date for every order that was placed by Mary Nelson and that contains an order line for an iron. Down below are the tables ORDER_LINE ORLN_ORDER_NUMBER ORLN_PART_NUMBER ORLN_NUMBER_ORDERED ORLN_QUOTED_PRICE ORDER_TABLE ORDR_ORDER_NUMBER ORDR_ORDER_DATE ORDR_CUSTOMER_NUMBER CUSTOMER CUST_NUMBER CUST_LAST CUST_FIRST CUST_STREET CUST_CITY CUST_STATE CUST_ZIP_CODE CUST_BALANCE CUST_CREDIT_LIMIT CUST_SALES_REP_NUM PART PART_NUMBER PART_DESCRIPTION UNITS_ON_HAND…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education