A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 8, Problem 2SCG
Program Plan Intro
SELECT statement:
It is used to retrieve information from the table or
Syntax:
SELECT * FROM table_Name;
“UPPER” keyword:
The keyword “UPPER” is used to convert the string into capital letters that is, it converts the string into upper case letters.
Syntax:
SELECT UPPER (column_Name) FROM table_Name;
“LOWER” keyword:
The keyword “LOWER” is used to convert the string into small letters that is, it converts the string into lower case letters.
Syntax:
SELECT LOWER (column_Name) FROM table_Name;
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
List the customer ID and first and last names for all customers located in the city of Cody. Your query should ignore case. For example, a customer with the city Cody should be included, as should customers whose city is CODY, cody, cOdY, and so on
List the owner number and last name for all owners located in the city of Seattle. Your query should ignore case. For example, a customer with the city Seattle should be included, as should customers whose city is SEATTLE, SEAttle, SeAttle, and so on.
StayWell is offering a monthly discount for residents who pay their rent on a quarterly basis. The discount is 1.75 percent of the monthly fee. For each property, list the office number, address, owner number, owner’s last name, monthly rent, and discount as DISCOUNT. The discount should be rounded to the nearest dollar.
If a subquery is used in the FROM clause of a query, how are the subquery’s results referenced in other clauses of the query?
Chapter 8 Solutions
A Guide to SQL
Ch. 8 - Prob. 1RQCh. 8 - Prob. 2RQCh. 8 - Prob. 3RQCh. 8 - Prob. 4RQCh. 8 - Prob. 5RQCh. 8 - Prob. 6RQCh. 8 - Prob. 7RQCh. 8 - Prob. 8RQCh. 8 - Prob. 9RQCh. 8 - In PL/SQL, how do you assign variables the same...
Ch. 8 - Prob. 11RQCh. 8 - Prob. 12RQCh. 8 - Prob. 13RQCh. 8 - Prob. 14RQCh. 8 - Prob. 15RQCh. 8 - Prob. 16RQCh. 8 - Prob. 17RQCh. 8 - Prob. 18RQCh. 8 - Prob. 19RQCh. 8 - Prob. 20RQCh. 8 - Prob. 21RQCh. 8 - Prob. 22RQCh. 8 - Prob. 1TDCh. 8 - Prob. 2TDCh. 8 - Prob. 3TDCh. 8 - Prob. 4TDCh. 8 - Prob. 5TDCh. 8 - Prob. 6TDCh. 8 - Prob. 7TDCh. 8 - Prob. 8TDCh. 8 - Prob. 9TDCh. 8 - Prob. 10TDCh. 8 - Prob. 1CATCh. 8 - Prob. 2CATCh. 8 - Prob. 3CATCh. 8 - Prob. 4CATCh. 8 - Prob. 5CATCh. 8 - Prob. 6CATCh. 8 - Prob. 7CATCh. 8 - Prob. 9CATCh. 8 - Prob. 1SCGCh. 8 - Prob. 2SCGCh. 8 - Prob. 3SCGCh. 8 - Prob. 4SCGCh. 8 - Prob. 5SCGCh. 8 - Prob. 6SCGCh. 8 - Prob. 7SCGCh. 8 - SQL includes many numerical functions. Two of...
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
- Task 2: List the owner number and last name for all owners located in the city of Seattle. Your query should ignore case. For example, a customer with the city Seattle should be included, as should customers whose city is SEATTLE, SEAttle, SeAttle, and so on.arrow_forwardWrite the following as MySQL query: Find the employee ID, first and last name, and salary for each employee whose salary ismore than $20,000 or who works in the shipping department. Use the UNION set operator. List the country ID, country name, city, and state/province. Be sure all country names areincluded in the result, regardless of whether there is no matching city and state/province. You have to use an outer join.arrow_forwardRun a query or multiple queries if needed to report on final exam average based on thestudent’s age. Give an average for all students 40 and below and an average for all studentsover 40. This report will be used continuously so you cannot just figure out what 40 years agotoday was. You need to use the date to calculate their age somewhere in your solutionarrow_forward
- 4. Which customers live in Georgia or New Jersey? Put the results in ascending order by lastname. List each customer’s customer number, last name, and state. Write this query in twodifferent waysarrow_forward4. How many customers do we have with a last name starting with a 'Q' living in each city? Your query should display two columns, one named cust_num and one named city. Sort the results alphabeticaly by city. 5. Show the product name, list price, customer state (call it 'CustState'), and manufacturer state (call it 'ManState') for all products made by manufacturers in Connecticut (CT) and purchased by customers in New York (NY). 6. For green sandals, how does the current list price compare to the price at which products have sold? Show the product name, the 7. What is the total number of products sold by each manufacturer? Your query should display two columns, one named productnum and one named manufacturername. Sort the results alphabetically by manufacturername.arrow_forward4. How many customers do we have with a last name starting with a 'Q' living in each city? Your query should display two columns, one named cust_num and one named city. Sort the results alphabeticaly by city. 5. Show the product name, list price, customer state (call it 'CustState'), and manufacturer state (call it 'ManState') for all products made by manufacturers in Connecticut (CT) and purchased by customers in New York (NY). 6. For green sandals, how does the current list price compare to the price at which products have sold? Show the product name, the 7. What is the total number of products sold by each manufacturer? Your query should display two columns, one named productnum and one named manufacturername. Sort the results alphabetically by manufacturername.arrow_forward
- Write a query to display the patron ID, first and last name of all patrons that have never checked out any book. Sort the result by patron last name and then first name. (See the figure below for the output) Write a query to display the patron ID and the average number of days that patron keeps books during a checkout. Limit the results to only patrons who have at least three checkouts. Sort the results in descending order by the average days the book is kept. (See the figure below for the output)arrow_forwardERD:- PK CHECKOUT Check Num FK1 Book_Num FK2 Pat_ID Check Out Date Check_Due Date Check_In_Date PK BOOK Book Num Book Title Book_Year Book_Cost Book_Subject FK1 Pat_ID -H- PATRON PK Pat ID Pat_FName Pat_LName Pat_Type WRITES PK,FK1 Book Num PK,FK2 Au ID AUTHOR PK AU ID Au_FName Au_LName Au_BirthYeararrow_forwardYour company needs to contact the 1st author of each textbook and to discuss reprint options. Pull out the 1st author for all the books. Please note that the order of authors has been marked as integer values 1, 2, 3, etc. in the field Auth_Order in the AuthorshipLog table. The query result should show the following information in the given order: Book title, 1st author’s last name, 1st author’s email, and 1st author’s phone. Save and name the query 2 First Author Contacts. How would I go about this in Access's query design?arrow_forward
- Question 28 Write a query that displays the name and hiredate of any employee hired after 24 October 2000 and has no manager. Sort the data in the descending order of their hiredates;arrow_forwardWrite a query that returns the Staff ID for the staff member who is involved in the most rentalsarrow_forwardFrom the following query, identify the value of City: INSERT INTO Customers ( CustomerName, ContactName, Address, City, PostalCode, Country) VALUES (‘Cardinal,”Tom B. Erichsen”,”Skagen 21”, “Stavanger,” “4006Norway’);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 PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning