MODERN DATABASE MGMT.(PEARSON CHANNEL)
13th Edition
ISBN: 9780136709299
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.)
QUICK SQL REQUEST (beginner level...)
Back at work on Monday morning, the Vice President of Purchasing asks you to help him with the analysis of in-process storage. He asks you to pull information regarding the number of products per storage location.
The result of the query should show: - The name of the warehouse (Location) - The number of different products per storage location - The total quantity of products found at this storage location - The average price of all products found at this storage location
He mentions that for the moment he is only interested in the locations that have more than 50 distinct products because he wants to start inventorying the biggest locations first.
Show the locations in order of smallest to largest number of distinct products.
My request is linked to the question but i'm having trouble executing it I would love to know how to do it, thanks in advance.
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.
Chapter 5 Solutions
MODERN DATABASE MGMT.(PEARSON CHANNEL)
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
- Considering Vaccination Database, write queries to: Display the Subject CNIC, Name, Contact, Dose1 Center, and Dose2 Center as shown below: CNIC Name Contact Dose1 Center Dose2 Center 22401-6645321-1 Nasir 3409991112 Lachi Kohat 2 14301-6045321-5 Shahab 3409991112 kohat 3 Dara The subjects who have been vaccinated different types in Dose1 and Dose2. For instance, subjects who were vaccinated ‘Sinovac’ in the first dose, while Pfizer in the second dose.How many Viles of each type have been consumed so far. How many subjects are vaccinated from expired viles. Suggest the name of Incharge for the best performance award based on the highest number of subjects vaccinated on a single dayarrow_forwardAnswer all my questions by using SQLarrow_forward. 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_forward
- Use 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_forwardInclude both SQL commands and SQL results in your answers: KimTay Pet Supplies is running a promotion that is valid for up to 20 days after an order is placed. List the invoice number, customer ID, customer first and last names, and the promotion date for each invoice. The promotion date is 20 days after the invoice was placed. Write PL/SQL (or MySQL) procedures to accomplish the following task: The procedure accepts the ID of a customer stored in the input variable named I_CUST_ID and displays the name (first name concatenated with last name) and credit limit of for this customer.arrow_forwardWrite PL/SQL procedure to display the name of all employees in the department which has Department_ID = 99 then display the total number of employees in this department. Note: you must use CURSOR for this question. You can use the following DBMS output statement : dbms_output.put_line('employee name '||X ); which means display ‘employee name’ together with the value of the variable Xarrow_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_forwardNeed help on this question with my sql code. Thank Youarrow_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_forward
- T-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_forwardAnswer these question by using these tables. Please. Create in PL/SQL a stored procedure called 'StudentsActivities' to display the list of students and the activities in which they participated. Create in PL/SQL a stored Function called 'Checkavailability' to check whether 'Salalah Hall' is busy or not in a given date. Create in PL/SQL a stored Procedure called 'CheckavailabilityProc' to call the function 'Checkavailability' and display the appropriate message according to the value returned by the function (If function returns true, the procedure will display 'Salalah Hall is free on date ######' otherwise'Salalah Hall is busy on date ###### '). CREATE TABLE Student (studid Char(9) Primary Key,FirstName Varchar2(50) NOT NULL,LastName Varchar2(50) NOT NULL,Email Varchar2(50) NOT NULL UNIQUE,PhoneNumber Number(8) NOT NULL UNIQUE,GPA Number(1,2) NOT NULL); Insert into Student(studid, FirstName, LastName, Email, PhoneNumber, DateOfBirth, GPA) values…arrow_forwardMS SQL server Create a Stored Procedures with the name of “usp_CalculateTotals”. usp_CalculateTotals should take three parameters: a client’s social security number (input parameter), mode (input parameter), and the total (output parameter). If the mode is 1, it should calculate the total balance of all the accounts of the client. If the mode is 2, it should calculate the total withdrawal amounts the client has done, and if the mode is 3, it should calculate the total deposit amounts the client has done. Implement the stored procedure below: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 Ptr
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
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