Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 8, Problem 8HOA
Display the book title and category for all books in the Children and Cooking categories. Create three different queries to accomplish this task: a) a search pattern operation, b) a logical operator, and c) another operator not used in a or b.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
8. Display the book title and category for all books in the Children and Cooking categories.Create three different queries to accomplish this task: a) a search pattern operation, b) alogical operator, and c) another operator not used in a or b.
7. Use the UNION operator to generate a result set consisting of three columns from the Products
table: Discount status A calculated column that contains a value of DISCOUNTED or FULL PRICE
Product_name The product_name column discount_percent The discount_percent column If the
product has a discount_percent greater than 0, the Discount_status column should contain a value of
DISCOUNTED. Otherwise, it should contain a value of FULL PRICE. Sort the final result set by
product_name.
2
Chapter 8 Solutions
Oracle 12c: SQL
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
- P5arrow_forwardPlease written by computer sourcearrow_forward1) Write the SQL code that will create the table structure for a table named EMP. This table is a subset of the EMPLOYEE table. The basic EMP table structure is summarized in the table below. (Note that the EMP_NUM is the PK)? ATTRIBUTE(FIELD) NAME DATADECLARATION Constraints EMP_NUM INT Auto generated Identifier, start from 101 EMP_LNAME VARCHAR(15) Not null EMP_FNAME VARCHAR(15) Not Null EMP_INITIAL CHAR(1) EMP_HIREDATE DATE Default value is system date JOB_CODE CHAR(3) Make sure input is in the range500,501,502arrow_forward
- Query 3: Write a parameter query to display the names of all prospects each member tried to recruit based on the member’s first name and the member’s last name you input. List the member’s First Name, member’s Last Name, prospect’s First Name, and prospect’s Last Name (in this order in the query grid). Display the member’s First Name Heading as Member First Name, member’s Last Name Heading as Member Last Name, prospect’s first name heading as Prospect First Name, and prospect’s last name heading as Prospect Last Name. Sort the list by Member Last Name, Member First Name, Prospect Last Name, and Prospect First Name, all ascending order. (WE ARE USING ACCESS SO I AM JUST TRYING TO UNDERSTAND WHAT TO PUT AND PLUG IN ETC. USE MY PICTURES AS REFERRENCE!)arrow_forward( Please answer this question immediately I do not have time ) Use the following table to answer the questions below: Table name: Books Column Name Role Data Type Length Constraint bookID Stores the ID of a book Number 5 Primary key bookTitle Stores the title of a book Varchar2 50 - bookISBN Stores the ISBN of a book Number 13 Cannot be null and duplicated publicationDate Store the publication date of a book Date - Cannot be null bookPrice Stores the price of a book Number 2,2 Cannot be null a. Write in SQL a command that creates the table Books according to the above description b. Write in SQL a statement that adds a new column named publisherID of type Char(10). This column should be defined as a foreign key that relates the table Books to the table Publisher c. Write in SQL a command that deletes the books that are published before 20-Aug-2010 d. Write a SQL query that displays the number of books that are published in the year 2018 e. Write in SQL a…arrow_forwardThe following statement uses a non-correlated subquery to find the South American country with the smallest population: SELECT * FROM Country WHERE Continent = 'South America' AND Population = (SELECT MIN(Population) FROM Country WHERE Continent = 'South America')\G Rewrite the statement to use a correlated subquery.arrow_forward
- Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, you can group the result set by the EmailAddress and OrderID columns. In addition, you must calculate the order total from the columns in the OrderItems table. Write a second SELECT statement that uses the first SELECT statement in its FROM clause. The main query should return two columns: the customer�s email address and the largest order for that customer. To do this, you can group the result set by the EmailAddress column.arrow_forwardHow do you indicate that a column alias should be used?arrow_forwardProduce a list of each customer number and the third and fourth digits of his or her zip code. The query should also display the position of the first occurrence of a 3 in the customer number, if it exists.arrow_forward
- Create a function that will calculate the total amount after tax (note: total amount after tax = amount + (amount * .15 ) (hint: use the following query before building the function: SET GLOBAL log_bin_trust_function_creators = 1 )arrow_forwardYou 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_forward7. SELECT name FROM instructor WHERE salary = 90000; This query can be replaced by which of the following ? a) SELECT name FROM instructor WHERE salary BETWEEN 90000 AND 100000; b) SELECT name FROM employee WHERE salary =100000; c) SELECT name FROM employee WHERE salary BETWEEN 90000 AND 100000; d) SELECT name FROM instructor WHERE salary BETWEEN 100000 AND 90000;arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
How to Design DB Tables for any Application? (The Basics); Author: Studytonight;https://www.youtube.com/watch?v=XUdNVaSikqY;License: Standard YouTube License, CC-BY
Create a Table (Introduction to Oracle SQL); Author: Database Star;https://www.youtube.com/watch?v=BiV1IrzB1sY;License: Standard Youtube License