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
update the JustLee Books database by executing the JLDB_Build_11.sql script, otherwise your solutions might not work!
What's the retail price of the most expensive book written by Sam Smith?
Determine the total profit generated by sales per customer. Note: Quantity should be reflected in the total profit calculation.
Modify problem 2 to include only those customers who live in FL.
Modify problem 3 to display the results with profit greater then $50.
Determine the average retail price of books by publisher name and category. Include only the categories Children and Computer and the groups with an average retail price greater than $50.
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
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
- Please help with the following: Using oracle sql live or sql developer what sql statements could be use to find the following: A simple database composed of the following tables: PATIENT, DOCTOR, DRUG, and PRESCRIPTION, is now loaded with this assignment and you are ready to start. Please explore the database and then write the appropriate SQL command. 1. List all the rows in which the prescription dates occur on or after November 14. 2. How many doctors provide prescriptions with 30 tablets in total? Beginfor c in (select table_name from user_tables) loopexecute immediate ('drop table '||c.table_name||' cascade constraints');end loop;End;//* */ ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';CREATE TABLE DOCTOR (DOC_ID varchar2(5) PRIMARY KEY,DOC_LNAME varchar2(15),DOC_FNAME varchar2(15),DOC_INITIAL varchar2(1),DOC_SPECIALTY varchar2(15));INSERT INTO DOCTOR VALUES('29827','Sanchez','Julio','J','Dermatology');INSERT INTO DOCTOR…arrow_forwardQUICK 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.arrow_forward||| > 4G Students table Write a SQL statement to create the following tow tables: 23 STD_ID STD_NAME COURSE_NO LEV 21 15 33 12 11 Bandar Khalid Naif 102 Ims.kku.edu.sa Yasser Ziyad Courses table 101 231 271 Assignments 231 102 271 101 Mohammad 101 4 Data Science 4 3 6 COURSE NO COURSE_NAME COURSE_TEAC Programming Abdulaziz Computing Abdulaziz Database Mohammad 5 4 ۱۰:۲۲ - Query1: Display all Student names who already registered in a course. - Query2: Display students names and course names from both students and courses tables for only students whose level is higher than 4. Ĵarrow_forward
- Write sql code for Use derived tables and joins to create a list of players who have scored more than 200 runs, taken more than 10 wickets, and taken more than two catches. runs is form batting wicketstaken from bowling catches is from fielding table (which is same as other tables0arrow_forwardscrip for table is providedarrow_forwardInstructions: Write the suitable SQL statement to answer the following questions based on the following tables ( image for better table) Table Name: Employee EMP_ID FNAME LNAME SALARY JOIN_DATE DEP_NO 101 John Abraham 10000 01-JAN-13 11 202 Michael Clarke 80000 01-JAN-13 22 303 Roy Thomas 70000 01-FEB-13 11 404 Tom Jose 60000 01-FEB-13 22 505 Jerry Pinto 65000 01-FEB-13 22 606 Philip Mathew 75000…arrow_forward
- Consider the following table: Instructors ID 12121 15151 22222 32343 33456 name Alice Wu John Mozart Frank Einstein El Said Chelsea Dunn deptName Finances Music Physics History Physics salary 90000.00 40000.00 95000.00 60000.00 90000.00 Write a single SQL query to list in descending order the deptNames and names of all instructors. Note that every column of Instructors should be included in the result.arrow_forwardWrite queries in SQL to answer each of the following questions: 1. Find all students in Comp. Sci. dept 2. Find all students with total credits > 100 3. Find all students who took course in Spring 2010 (Remove duplicates please) 4. Find all courses taken by the student whose ID is 76543 and also find his name create table student (ID varchar(5), name varchar(20) not null, dept_name varchar(20), tot_cred numeric(3,0), primary key (ID) ); create table takes (ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), grade varchar(2), primary key (ID, course_id, sec_id, semester, year) ); insert into student values ('00128', 'Zhang', 'Comp. Sci.', '102'); insert into student values ('12345', 'Shankar', 'Comp. Sci.', '32'); insert into student values ('19991', 'Brandt', 'History', '80'); insert into student values ('23121', 'Chavez', 'Finance', '110'); insert into student values ('44553', 'Peltier', 'Physics', '56'); insert into student values…arrow_forwardUse your ERD to define the table structures in the database using SQL DDL commands to build your schema.arrow_forward
- Using the Henry Books database,Henry Books no longer carries books written by Barbara Owen. Delete this author from the authors table. You will insert 2 snips for this question. What construct did you use to delete author Barbara Owens? Insert the snip of the construct used: Insert the snip of the authors table. Be sure all rows are displayed:arrow_forwardI need help with the SQL query for the following question: 1. What is the total number of reviews in every zip code. Here is the information on the field names: The table name is: Reviews Review Form Fields Product/ModelName: Product/Category: Product/Price: Retailer/Name: Retailer/ZipCode: Retailer/City: Retailer/State: Product/On Sale: Manufacturer/Name: Manufacturer/Rebate: Review/UserId: Review/Rating: Review/Date: Review/Text: Example of Review Form Filled out ProductModelName: Galaxy S4 ProductCategory: Smart Phone ProductPrice: 499 RetailerName: Bestbuy RetailerZipCode: 44114 RetailerCity: Cleveland RetailerState: OH ProductOnSale: No ManufacturerName: Samsung ManufacturerRebate: No ReviewUserId: xmm473 ReviewRating: 3 ReviewDate: 6/10/2012 ReviewText: overheats after 2 hoursarrow_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_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