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
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.
The Movie table has the following columns:
ID - integer, primary key
Title - variable-length string
Genre - variable-length string
RatingCode - variable-length string
Year - integer
Write a SELECT statement to select the year and the total number of movies for that year.
Hint: Use the COUNT() function and GROUP BY clause.
NOTE: Starter code has been provided. Simply change the blanks ("_") to the appropriate entity/value.
1) 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,502
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
- 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.arrow_forwardQuery 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_forwardPlease help, I know it's hard but no one else is willing to try and I am lost and spent three days on this so far. Write a query to display the author ID, first and last name for all authors who have ever written a book with the subject Programming. Sort the results by author's last name (Figure P7.106). In the SQL Query do the following Select clause: Display the columns stated in the problem statement From clause: AUTHOR table Where clause: authors who have ever written a book with the subject Programming. (Hint: Subquery) Order by clause: Sort the results by author last namearrow_forward
- Q#1 Print the name of players who played any tournament organized by “hafiz asif”. (Nested Queries)Q#2 Print the sponsors name and tournament name where sponsor name starts with “a”. (Inner Join)Q#3 Print the rank code of the tournament name “grand master”.Q#4 Find and display what type of rank players played in a tournament organized by omer khalid.Q#5 Print the name of the players and email who have started matches in 2002,2003 and 2004.(Nested queriesarrow_forwardWrite 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_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
- How 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_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_forward
- What does the group by clause accomplish?arrow_forwardSelect the best answer from the given choices: Queries can be used within statement(s): update delete All of the answers Insertarrow_forwardCreate 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_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