Modern Database Management
13th Edition
ISBN: 9780134773650
Author: Hoffer
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 5, Problem 5.85PAE
Program Plan Intro
To list:
The total number of ordersfor 2018.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
For each salesperson, list the total number of orders by month for the year 2015. (Hint: If you are using Access, use the Month function. If you are using Oracle, convert the date to a string, using the TO_CHAR function, with the format string ‘Mon’ [i.e., TO_CHAR(order_ date,’MON’)]. If you are using another DBMS, you will need to investigate how to deal with months for this query.)
Use FOR loop for your
cursor.
Write a PL/SQL block to read
and display the job_id and
number of employees per
job_id. Accept input from the
user to get the number of
employees he wants to see in
the output.
Display also the number of
records returned by your
PL/SQL block.
Answer all my questions by using SQL
Chapter 5 Solutions
Modern Database Management
Ch. 5 - Define each of the following terms: data...Ch. 5 - Match the following terms to the appropriate...Ch. 5 - Prob. 5.3RQCh. 5 - Prob. 5.4RQCh. 5 - Prob. 5.5RQCh. 5 - Prob. 5.6RQCh. 5 - List six potential benefits of achieving an SQL...Ch. 5 - Prob. 5.8RQCh. 5 - Distinguish among data definition commands, data...Ch. 5 - Prob. 5.10RQ
Ch. 5 - Prob. 5.11RQCh. 5 - Explain the purpose of indexing in database...Ch. 5 - What are the potential consequence of...Ch. 5 - Prob. 5.14RQCh. 5 - Explain and provide at least one example Of how to...Ch. 5 - Prob. 5.16RQCh. 5 - What is the difference between COUNT, COUNT...Ch. 5 - What is the evaluation order for the Boolean...Ch. 5 - If an SQL statement includes a GROUP BY clause,...Ch. 5 - Prob. 5.20RQCh. 5 - Prob. 5.21RQCh. 5 - Prob. 5.22RQCh. 5 - Explain why SQL is called a set-oriented language.Ch. 5 - When would the use of the LIKE key word with the...Ch. 5 - Prob. 5.25RQCh. 5 - Prob. 5.26RQCh. 5 - In what order are the clauses of an SQL statement...Ch. 5 - Within which clauses of an SQL statement can a...Ch. 5 - Prob. 5.29RQCh. 5 - Prob. 5.30RQCh. 5 - Prob. 5.31RQCh. 5 - Explain the difference between the WHERE and...Ch. 5 - Prob. 5.33RQCh. 5 - Write a database description for each of the...Ch. 5 - Analyze the database to determine whether or not...Ch. 5 - Prob. 5.36PAECh. 5 - To enforce referential integrity, before any row...Ch. 5 - Write SQL data definition commands for each of the...Ch. 5 - Write SQL commands for the following: Create two...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Prob. 5.44PAECh. 5 - Prob. 5.45PAECh. 5 - Prob. 5.46PAECh. 5 - What is the average Read score for all students?...Ch. 5 - Prob. 5.48PAECh. 5 - What are the TutorIDs for tutors who have not yet...Ch. 5 - Prob. 5.50PAECh. 5 - Prob. 5.51PAECh. 5 - Prob. 5.52PAECh. 5 - Prob. 5.53PAECh. 5 - Prob. 5.54PAECh. 5 - How many tutors have an Active status in the...Ch. 5 - Prob. 5.56PAECh. 5 - Modify the Product_T table by adding an attribute...Ch. 5 - Enter sample data of your own choosing into...Ch. 5 - Add an order to the Order_T table and include a...Ch. 5 - Use the Pine Valley database to answer the...Ch. 5 - Prob. 5.61PAECh. 5 - Prob. 5.62PAECh. 5 - Prob. 5.63PAECh. 5 - Prob. 5.64PAECh. 5 - Prob. 5.65PAECh. 5 - Prob. 5.66PAECh. 5 - Prob. 5.67PAECh. 5 - Modify query in P&E 5-67 by considering only those...Ch. 5 - Prob. 5.69PAECh. 5 - Prob. 5.70PAECh. 5 - Prob. 5.71PAECh. 5 - Prob. 5.72PAECh. 5 - Prob. 5.73PAECh. 5 - Prob. 5.74PAECh. 5 - Prob. 5.75PAECh. 5 - Prob. 5.76PAECh. 5 - Prob. 5.77PAECh. 5 - Assume that for those materials the ID of which...Ch. 5 - Prob. 5.79PAECh. 5 - Prob. 5.80PAECh. 5 - Prob. 5.81PAECh. 5 - Prob. 5.82PAECh. 5 - Prob. 5.83PAECh. 5 - Prob. 5.84PAECh. 5 - Prob. 5.85PAECh. 5 - Prob. 5.86PAECh. 5 - Prob. 5.87PAECh. 5 - Prob. 5.88PAECh. 5 - Prob. 5.89PAECh. 5 - Prob. 5.90PAECh. 5 - Prob. 5.91PAECh. 5 - Prob. 5.92PAECh. 5 - Prob. 5.93PAE
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
- . Write the following inserts, deletes, updates, and select in SQL.a. Increase the salary of each instructor in the Comp. Sci. department by 10%.b. Delete all courses that have never been offered (i.e., do not occur in the section relation).c. Insert every student whose tot cred attribute is greater than 100 as an instructor in the same department, with a salary of $10,000.d. Find the ID and name of each student who has not taken any course offered before 2017.arrow_forwardIn Oracle database, If ORDER_DATE field exist in any of our tables, then we can include the following in our WHERE clause: I: to_char(order_date, 'Mon yyyy')='Feb 2001' to_char(order_date, II: 'mon yyyy')='FEB 2001' I & II: are correct I & II: are not correct 1 I & II: are not correct I & II: are correct Ollarrow_forwardUse FOR loop for your cursor. Write a PL/SQL block to read and display the department name and number of employees per department. Accept input from the user to get the number of employees he wants to see in the output. Display also the number of records returned by your PL/SQL block.arrow_forward
- Answer the given question with a proper explanation and step-by-step solution. please help me in SQL... we are working on Oracle .the class ITD 134 Using a numeric loop that runs from the first instructor_id to the last instructor_id, select instructor first_name, last_name and also how many sections instructor teaches. Print all this data on one line for one instructor, then another line for another instructor. When loop finishes, the info for all the instructors should be printed.arrow_forwardhelp with sql class 7. For each book, list the book name, the author name, and the publisher's name. 8. Find the name of the author who wrote the longest book in terms of pages.arrow_forwardT-SQL procedure A: obtain the name and credit limit of the customer whose number currently is stored in I_CUSTOMER_NUM. Place these valuse in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. Output the content of I_CUSTOMER_NAME and I_CREDIT_LIMIT. B: obtain the order date, customer number and name for the order whose number currently is stored in I_ORDER_NUM. place these values in the variables I_ORDER_DATE, I_CUSTOMER_NUM and I_CUSTOMER_NAME , respectively. output the contents of I_ORDER_DATE, I_CUSTOMER_NUM , and I_CUSTOMER_NAME. C: add a row to the ORDERS table. D: change the date of the whole number is stored in I_ORDER_DATE to the date currently found in I_ORDER_DATE. E: delete the order whose number is stored in I_ORDER_NUM.arrow_forward
- Write the following queries in SQL, using the relations in the appendix. i. Find the full names of patients who have been given prescriptions, each with the drug name and the dosage.ii. Find the names of drugs that have been prescribed to the patients; make sure there are no duplicates in the result.iii. Find the codes and names of all drugs that are prescribed by a doctor whose ID is 32445; make sure there are no duplicates in the result.iv. Find the highest price of a drug.arrow_forwardIn the Testa EV database described in the previous question, fill in the blanks in the following MySQL statement to list (in this order) all the part numbers of components of 'EV Dashboard' (with Part_No=1) and their quantities; sort the results in ascending order of quantity of components (i.e., components with small quantities are listed first). (Please ensure correctness in the spelling of all names and commands. Do not enter unnecessary symbols such as spaces or commas)arrow_forwardPlease I want the EER or E-R Digram for this question: A patient is identified by patient id, and admission date. • A patient must be either an Emergency patient or a resident patient. • We must record the checkback date for Emergency patient. • Only resident patient is assigned to one room. Room has a unique number, degree, and floor number. • For each room there are a number of beds each of which has a bed number, specification. If a room is deleted, you need not keep track of its beds any longer. • Both emergency patient and resident are cared for by a responsible Doctor. Doctor is identified by Doctor number. For each Doctor, the name, several specialty, and years of experience must be recorded. • Doctors prescribe medicine for patients. Medicine is identified by trade name that has scientific name and formula. The medicine depends on another medicine to be taking before. • A doctor could prescribe one or more drugs for several patients, and a patient could obtain prescriptions…arrow_forward
- Use SQL and run on Oracle: 1.Use exists operator and find all clients that have not viewed property for rent number ‘PA14’. 2.Insert these three records into the staff table: (‘SG15’, ‘Yusuf’, ‘Kareem’, ‘Assistant’, ‘M’, ‘1970-06-20’, 9300, ‘B003’) (‘SG16’, ‘Aishah’, ‘Ahmad’, ‘Manager’, null, null, null, ‘B003’) (‘SG17’, ‘Ibrahim’, ‘Zeki’, ‘B003’) Use SQL and run on Oracle: Increase the rent for all flats in Glasgow by 15%. Tina Murphy had just sold all her properties to Carol Farrel. Update the correct records to reflect the transfer of ownership from Tina to Carol. Delete the branch office in ‘163 Main St’ from the Database record.arrow_forwardWhat mechanisms are in place within SQL to handle errors within user-defined functions?arrow_forwardPlease help with the following: Write following SQL Queries:A simple database composed of the following tables: PATIENT, DOCTOR, DRUG, and PRESCRIPTION, List all the rows in which the prescription dates occur on or after November 14. How many doctors provide prescriptions with 30 tablets in total? List doctor’s details where speciality is either Dermatology or Neurology. (Use INoperator). List the results by the first name in ascending order and the last name indescending order Find all patients rows whose first names include ‘George’ (Assume case sensitivity). List number of patients that do not have a phone number. How many drugs with price < 40$? How many prescriptions are generated for each patient, limit the listing to patients who have more than 2 prescriptions? List the drug codes and prices (rounded to one decimal place). How many doctors prescribe the drug code KO15? List all drugs with their expiration date (one year from the date of manufacturer)…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY