EBK A GUIDE TO SQL
9th Edition
ISBN: 8220103671682
Author: Last
Publisher: CENGAGE L
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 6BCERA
To determine
To list the order number, order date that are placed on 9/10/2018 by the client with consultant number 35 using Relational Algebra.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Using the relational database given in lab work no. 2, write the following queries in SQL: 1) How many different courses are there in each department? Sort the list. 2) How many students do have an advisor in the computer engineering faculty? 3) For each department, find out the highest CGPA of a student. Sort the list. (Add a new column to the student table!) 4) How many instructors are advising more than three students? 5) Which department has the highest number of students? 6) Which courses have multiple prerequisites? Sort the list. 7) How many different instructors taught the “Computer Programming” course at least two times? 8) Which instructor taught the “Object-Oriented Programming” course the most time? You should also present the output of each query in the lab report.
_________________________________________________________________
The relational database schemas are as follows: department(dept-name, building, budget) instructor(ID, name, dept-name, salary) student(ID, name,…
Create both the tables Branch and Supervisor with appropriate attribute names, primary key, foreign key and data type.
Insert the above records into Branch and Supervisor tables.
Display all the records from Branch and Supervisor (Separately)
Display all the details of Name, City and Salary.
Display the total salary for every city in the supervisor table.
Write a PL/SQL program to display BName from the Branch table for D5.
Write a PL/SQL program to display all the details of Supervisor who is getting more than 1250 salary using cursor.
Update city as ‘Suhar’ for Supervisor named Jack.
Write a Procedure to receive a Supervisor SId as Input and display all the related values of that Supervisor. (Also write the calling program.)
Delete all the branch details of operations.
Use SQL and TAL Distributors database to complete the following questions:TAL Distributors is running a promotion that is valid for up to 20 days after an order is placed. List the order number, customer number, customer name, and the promotion date for each order. The promotion date is 20 days after the order was placed.
Chapter 2 Solutions
EBK A GUIDE TO SQL
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Prob. 4RQCh. 2 - Prob. 5RQCh. 2 - Prob. 6RQCh. 2 - Prob. 7RQCh. 2 - Prob. 8RQCh. 2 - Prob. 9RQCh. 2 - Prob. 10RQ
Ch. 2 - Prob. 11RQCh. 2 - Prob. 12RQCh. 2 - Prob. 13RQCh. 2 - Prob. 14RQCh. 2 - Prob. 15RQCh. 2 - Prob. 16RQCh. 2 - Prob. 17RQCh. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Prob. 20RQCh. 2 - Prob. 21RQCh. 2 - Prob. 22RQCh. 2 - Prob. 23RQCh. 2 - Prob. 24RQCh. 2 - Prob. 25RQCh. 2 - Prob. 26RQCh. 2 - Prob. 27RQCh. 2 - Prob. 28RQCh. 2 - Prob. 29RQCh. 2 - Prob. 30RQCh. 2 - Prob. 1BCEQBECh. 2 - Prob. 2BCEQBECh. 2 - Prob. 3BCEQBECh. 2 - Prob. 4BCEQBECh. 2 - Prob. 5BCEQBECh. 2 - Prob. 6BCEQBECh. 2 - Prob. 7BCEQBECh. 2 - Prob. 8BCEQBECh. 2 - Prob. 9BCEQBECh. 2 - Prob. 10BCEQBECh. 2 - Prob. 11BCEQBECh. 2 - Prob. 12BCEQBECh. 2 - Prob. 13BCEQBECh. 2 - Prob. 14BCEQBECh. 2 - Prob. 15BCEQBECh. 2 - Prob. 16BCEQBECh. 2 - Prob. 17BCEQBECh. 2 - Prob. 18BCEQBECh. 2 - Prob. 1BCERACh. 2 - Prob. 2BCERACh. 2 - Prob. 3BCERACh. 2 - Prob. 4BCERACh. 2 - Prob. 5BCERACh. 2 - Prob. 6BCERACh. 2 - Prob. 7BCERACh. 2 - Prob. 1CATCCh. 2 - Prob. 2CATCCh. 2 - Prob. 3CATCCh. 2 - Prob. 4CATCCh. 2 - Prob. 5CATCCh. 2 - Prob. 6CATCCh. 2 - Prob. 7CATCCh. 2 - Prob. 8CATCCh. 2 - Prob. 9CATCCh. 2 - Prob. 10CATCCh. 2 - Prob. 11CATCCh. 2 - Prob. 12CATCCh. 2 - Prob. 13CATCCh. 2 - Prob. 14CATCCh. 2 - Prob. 15CATCCh. 2 - Prob. 16CATCCh. 2 - Prob. 17CATCCh. 2 - Prob. 18CATCCh. 2 - Prob. 1SPTCCh. 2 - Prob. 2SPTCCh. 2 - Prob. 3SPTCCh. 2 - Prob. 4SPTCCh. 2 - Prob. 5SPTCCh. 2 - Prob. 6SPTCCh. 2 - Prob. 7SPTCCh. 2 - Prob. 8SPTCCh. 2 - Prob. 9SPTCCh. 2 - Prob. 10SPTCCh. 2 - Prob. 11SPTCCh. 2 - Prob. 12SPTCCh. 2 - Prob. 13SPTCCh. 2 - Prob. 14SPTCCh. 2 - Prob. 15SPTCCh. 2 - Prob. 16SPTCCh. 2 - Prob. 17SPTCCh. 2 - Prob. 18SPTCCh. 2 - Prob. 19SPTC
Knowledge Booster
Similar questions
- Write the following queries in SQL, using the university schema. (We suggestyou actually run these queries on a database, using the sample data that weprovide on the web site of the book, db-book.com. Instructions for setting upa database, and loading sample data, are provided on the above web site.). Find the sections that had the maximum enrollment in Fall 2017.arrow_forwardWrite the following queries in SQL, using the university schema. (We suggestyou actually run these queries on a database, using the sample data that weprovide on the web site of the book, db-book.com. Instructions for setting upa database, and loading sample data, are provided on the above web site.). Find the maximum enrollment, across all sections, in Fall 2017arrow_forwardUsing the relations given in the appendix, write the SQL statements to perform the following operations:i. Add a new employee in the employee table whose employee number is 1009, full name is Stephen M. Clinton, date of birth is 23rd July 1970, and hire date is 1st July, 2022.ii. Add a dependant of this employee in the employee table, with dependant number of 1, first name specified as Johannes and date of birth specified as 5th February, 2005.iii. Delete records in the dependant table where the dependantnumber is 2.iv. Delete all dependants of the employee with employee number 1008 from the dependant table.arrow_forward
- Use the Pine Valley Furniture (PVF) database for this question. Write a SQL query to display the customer ID and total number of orders placed for those customers who placed more than one order.arrow_forwardPart B Create the entities, subtypes, and relationships according to the business rule below. Then map the entities identified into tables. Do these in SQL developer. BUSINESS RULE: A Seller can be categorized as Retailer or Wholesaler. All sellers have a seller id, first name, last name, contact no and maximum credit. A retailer has a RetailPrice, while a Wholesaler has a WholeSalePrice. Each seller should be categorized only to either a retailer or a wholesaler and cannot be a retailer and a wholesaler at the same time. A seller can have one or more shops and shops must be owned by a seller. A shop can contain many products and many products must be found in at least one shop or more shops. Products Shops price type manufacturer Kaddress name Copy and Paste your answers here. (Answers should come from SQL developer)arrow_forwardThe ER diagram of the database is given above. Write the following queries. 1. Write a query to get the First Name and Last Name of all employees from department with ids 30 and 40; Hint: Use the employees table. 2. Write a query to get all first name, last name and emails of employees who make commission greater than 0. Hint: Use the employees table. 3. Write a query to get the Average salary of all employees working as Programmers. Hint: Use the employees table. 4. Write a Query to get the First Name, Last Name and Salary of the employee who is paid the lowest salary in the company. Hint: Use the employees table. 5. Write a Query to get the maximum, minimum and average salary of each department. Hint: Use the employees table.arrow_forward
- Using the relational database given in lab work no. 2, write the following queries in SQL:1) Which course titles were given by at least two different instructors during the past?2) Which departments have at least two instructors and at least ten students?3) Which students took COMP117 from Cem Kalyoncu and COMP124 from Zafer Erenel?4) Which students are advised by Soydan Redif and took at least one course from Ezgi Ulker?5) Which students took multiple courses from Zafer Erenel but not a single course from Vesile Evrim?6) For each department, find out the highest salaried instructor name and the highest total credited student name.You should also present the output of each query. ////the database of Lab 2 is on attached file)arrow_forwardAnswer the given question with a proper explanation and step-by-step solution. Using SQL Server and the AdventureWorks2012 Database to create Multi table queries. A) Write a query to find out how many products had a scrapped quantity greater than 20 and an order quantity greater than 2000. List the Product ID, Product Name, Product Number, Work Order ID, Order Quantity, Scrapped Quantity, and Scrap Reason ID. Sort by Scrapped Quantity, and then by Product ID. Use the Production.Product and the Production.Workorder tables. B) Write a query to find out how many Vista credit cards expire in 2008 or more recent (2009, 2010, etc.) from customer 11151, 11223, and 11750. List the Credit Card ID, Card Type, Card Number, Expiration Month, Expiration Year, Sales Order ID, and Customer ID. Order by Customer ID. Use the Sales.Creditcard and Sales.SalesOrderHeader tablesarrow_forwardPlease convert following figure into a relational schera, In cuch table, the primery key and foreign keys (arrows) must be identified. BANK BRANCHES BANK BRANCH Code Name Addr Addr Branch no ACCTS LOANS Acct no Balance Loan no Amount ACCOUNT Type LOAN Type M AC LC Ssn Name Phone CUSTOMER Addrarrow_forward
arrow_back_ios
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