Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
7-Display last name of employees whose manager is KING.8-Display last name, salary and job title of all employees who earns more than the lowest salary. (Employees andJobs)9-Display all employees including King, who has no manager. Order the results by the employee number.10-Display the name and hire date of any employee hired after employee Davis
2. Based on Table 1 and Table 2, write Transact-SQL queries to answer the following questions.
Provide the output of each query. (Hint: Use Microsoft SQL Server to write query)
Table 1: PAINTING
Painting No
2018
2023
2041
2942
2045
2103
Table 2: PAINTER
Painter No
10014
10015
10016
Title
Dawn Thunder
The Starry Night
Sunrise
The Night Cafe
The Gardener
Sunset
Title
Mr
Ms
Mr
Name
Johan
Anne
Michael
Painter_No
10016
10015
10015
10014
10015
10014
Phone
844-2573
894-1238
Null
Gallery No Price (RM)
1000
1600
900
7000
5600
2000
18
18
23
24
18
24
Email
johan@gmail.com
anne@gmail.com
michael@gmail.com
List the first name and last name of all authors. Concatenate the first and last names so that the result set has only one column. Hint: CONCAT(). For example:
+---------------+
| Full Name |
+---------------+
| Mike Lance |
| Steve Smith |
| Anne Penny |
| Ron MacDonald |
| Sylvia Parry |
| Albert Jones |
+---------------+
Knowledge Booster
Similar questions
- Use a LIST to store the sales data for each month with the three-letter abbreviation for the month to use as the key for each item. Add data for each month and give the user the option to edit the sales data if they want. Finally display or view the sales data for any three letter month the user inputsarrow_forwardThe date used in the answer is not the date used in the question. INCORRECT.arrow_forwardFor each filing segment, indicate in the table whether a cross-reference is needed. Then scroll down to the blank rows at the bottom of the table and fill in the necessary cross-references, in order, starting with the first blank row of the table. For each cross-reference, in the far left column of the table, fill in the original filing segment number followed by X. (For example, a cross-reference for filing segment 1. Would be labeled 1X). Then, fill in the filing segment and key units. Then , for each cross-reference, fill in the cross-reference note (“SEE…” or “SEE ALSO…”) in the column on the far right of the table. See the example filing segment and scroll down to see it’s corresponding cross-reference example.arrow_forward
- Please give me correct solution.arrow_forwardPlease give me correct solution with explanation. The DATE option of the COLUMN command does not allow a specific format to be applied to date values. True Falsearrow_forwardThe Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name and height for only horses that have an above average height. Order the results by height (ascending).arrow_forward
- he Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name, height, and birth date for only horses that have a height between 15.0 and 16.0 (inclusive) or have a birth date on or after January 1, 2020.arrow_forwardThe Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name and height for only horses that have an above average height. Order the results by height (ascending). Hint: Use a subquery to find the average height.arrow_forwardHow about this 3) Prompt the user to search for the student id by the student's name.arrow_forward
- For each artist who is currently in a band and is under 30 years old: * Return the artist’s full name, gender, date of birth (formatted like "06/12/2019"), and the name of the band they are in with date joined formatted like "July 18, 2022". Order the results by artist name * You will not get full points if you just say something like DOB > '1992-07-18' (hard coded thirty tears ago today). The query would not age well! Tables and values are in the picture attached.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_forwardTask 22: KimTay Pet Supplies is considering discounting the price of all items by 10 percent. List the item ID, description, price, and discounted price for all items. Use DISCOUNTED_PRICE as the name for the computed column.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr