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
thumb_up100%
Based on the stage 2, write queries for the following questions: Sample output are provided for some queries.
- Write a query to display all vendors sorted by vendor name.
- Write a query to display the product id, description, type, base, category, and price for all products that have a product base of water and a product category of sealer.
- Write a query to display the first name, last name, and email address of employees who were not hired from January 1, 2015, to December 31, 2019. Sort the output by last name and then by first name.
- Write a query to display the first name, last name, phone number, title, and department number of employees who work in department 123 and have the title “Assistant.”
- Write a query to display the employee number, last name, first name, salary “from” date, salary end date, and salary amount for employees 99675, 53845, and 44035. Sort the output by employee number and salary “from” date.
- Write a query to display the first name, last name, street no, street name, city, state, and zip code of any customer who purchased a Forest brand between July 15, 2015, and Jul 20, 2015. If a customer purchased more than one such product, display the customer’s information only once in the output.
- Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title does not end in the word ”Assistant".
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
- Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title does not end in the word ”Assistant".
Solution
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
- Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title does not end in the word ”Assistant".
Solution
by Bartleby Expert
Knowledge Booster
Similar questions
- Management is considering closing on Sundays and would like to have a feeling for the kinds of customers that come to the dealership on Sunday. Create a totals query that shows the count of encounters on the Sundays of July 2015—grouped by the credit description held by the customer of the encounter. The Sundays in July of 2015 are the 5th, 12th, 19th, and 26th. Your answer should have two columns (CreditDescription and encounter_count) and should be sorted alphabetically by credit description. This is what Ive been working with and doesn't give me results, just error messages. SELECT R.CreditDescription, E.CustomerID FROM Encounter E JOIN Customer C ON E.CustomerID = C.CustomerID JOIN CreditRating R ON C.CreditID = R.CreditID WHERE E.EncDate = STR_TO_DATE('2015-07-05','2015-07-12','2015-07-19','2015-07-26'); ORDER BY creditrating.creditid, ASC; creditrating creditid creditdescription minfico maxfico comments customer customerid cfirstname clastname…arrow_forwardModify the query in Problem 13 to include the number of individual product purchases made by each customer. (In other words, if the customer’s invoice is based on three products, one per LINE_NUMBER, you count three product purchases. Note that in the original invoice data, customer 10011 generated three invoices, which contained a total of six lines, each representing a product purchase.) Your output values must match those shown in Figure P7.14, sorted by customer code.arrow_forward4. How many customers do we have with a last name starting with a 'Q' living in each city? Your query should display two columns, one named cust_num and one named city. Sort the results alphabeticaly by city. 5. Show the product name, list price, customer state (call it 'CustState'), and manufacturer state (call it 'ManState') for all products made by manufacturers in Connecticut (CT) and purchased by customers in New York (NY). 6. For green sandals, how does the current list price compare to the price at which products have sold? Show the product name, the 7. What is the total number of products sold by each manufacturer? Your query should display two columns, one named productnum and one named manufacturername. Sort the results alphabetically by manufacturername.arrow_forward
- You have been told that you need to store the zip code for employees. Add a column to the EMPLOYEE table which will be used to store each employee’s zip code Update two rows in the EMPLOYEE table and assign a zip code (must have a WHERE clause). (you MAY use 1 or 2 statements) Write a query that includes each employee's last name, department name (not ID), and salary for each employee whose salary is less than the average for their departmentarrow_forwardGiven 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_forwardWrite an SQL query using the UPDDATE and SET operator that willoverwrite all values containing 16 with 32 in the SupplierID attribute inthe Products table.arrow_forward
- 4) Display the firstname, lastname of the employees and the customerID that the employee served. Arrange the results by the last name. 5) Write a query to the Name of the Product and the corresponding name of the supplier of that Product for all the products that start with a “P”. 6) Write a SQL query to output the product name and the quantity of the Orders of that product for those orders with more than 70 quantity. (hint: don’t have to use GROUP BY) I need help figuring out the SQL quereys for the questions above using table joining methodarrow_forwardIf a subquery is used in the FROM clause of a query, how are the subquery’s results referenced in other clauses of the query?arrow_forwardWrite a query that returns the Name of ALL Customers (based on CUS_FNAME and CUS_LNAME in CUSTOMER table, call this CUSTOMER_NAME), Phone number of ALL Customers (based on CUS_AREACODE and CUS_PHONE in CUSTOMER table, call this CUSTOMER_PHONE), for those haven’t flied before (based on the record in CHARTER table).arrow_forward
- Write a query to get the maximum and minimum salary from the senators table (in that order).arrow_forward5. Which orders were placed on or before April 1, 2009? List each order number and orderdate. Write this query in two different ways.arrow_forwardProblem 98 Write a query to display the book number, title, and number of times each book has been checked out. Include books that have never been checked out. Sort the results in descending order by the number of times checked out and then by title (Figure P7.98).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