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
Textbook Question
Chapter 3, Problem 8CAT
Colonial Adventure Tours would like to increase the length of the START _LOCATION field in the TRIP table to 75 characters. Create but do not execute the SQL statement to change the length of the field to 75 characters.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
You 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 department
SQL Server
Please help answer question 5
Please type out the answer because I cannot read the last answer because the handwriting is not very clear. Thank you.
Q1. Please write SQL codes to query data from dvd table based on below criteria
Please write a SELECT statement to display different DVD title (the same title will be displayed one and only one time) and the first character of the DVD titles must be between ‘A’ and ‘L’. Please display the result in descending order (from ‘A’ to ‘L’ order). The result should be identical to below results:
[screen-shot]
Chapter 3 Solutions
A Guide to SQL
Ch. 3 - Prob. 1RQCh. 3 - How do you delete a table using SQL?Ch. 3 - Prob. 3RQCh. 3 - Prob. 4RQCh. 3 - Prob. 5RQCh. 3 - Prob. 6RQCh. 3 - Prob. 7RQCh. 3 - Prob. 8RQCh. 3 - Prob. 9RQCh. 3 - Prob. 10RQ
Ch. 3 - Prob. 11RQCh. 3 - Prob. 12RQCh. 3 - Prob. 13RQCh. 3 - Use SQL to complete the following exercises....Ch. 3 - Prob. 2TDCh. 3 - Prob. 3TDCh. 3 - Prob. 4TDCh. 3 - Prob. 5TDCh. 3 - Prob. 6TDCh. 3 - Prob. 7TDCh. 3 - Prob. 1CATCh. 3 - Add the following row to the ADVENTURE_TRIP table:...Ch. 3 - Prob. 3CATCh. 3 - Prob. 4CATCh. 3 - Prob. 5CATCh. 3 - Prob. 6CATCh. 3 - Review the data for the TRIP table in Figure 1-5...Ch. 3 - Colonial Adventure Tours would like to increase...Ch. 3 - Prob. 1SCGCh. 3 - Add the following record to the VACATION_UNIT...Ch. 3 - Delete the VACATION_UNIT table.Ch. 3 - Prob. 4SCGCh. 3 - Prob. 5SCGCh. 3 - Prob. 6SCGCh. 3 - The SERVICE_REQUEST table uses the CHAR data type...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Consider the adage Never ask a question for which you do not want the answer. a. Is following that adage ethica...
Experiencing MIS
Explain the difference between using a computer program and programming a computer.
Big Java Late Objects
Run the hello, world program on your system. Experiment with leaving out parts of the program, to see what erro...
C Programming Language
Give a Java statement that will display a dialog window on the screen with the message I Love You.
Java: An Introduction to Problem Solving and Programming (8th Edition)
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
- How do you indicate that a column alias should be used?arrow_forwardQ1. Please write SQL codes to query data from member tables based on below criteria Please write a SELECT statement to display each member data that street must NOT be ‘STREET’ and ‘LANE’, and valid_date CANNOT be ‘FEB’, ‘APR’, and ‘JUN’. Please display the result in descending order of the last_name. The result should be identical to below results: [SCREENSHOT] I try to use this, but it gives me this error: SELECT MEMBER_ID, FIRST_NAME, LAST_NAME, STREET, FORMAT(VALID_DATE, 'dd-MM--yy')FROM MEMBERWHERE STREET NOT IN ('STREET', 'LANE')AND MONTH(VALID_DATE) NOT IN (2, 4, 6)ORDER BY LAST_NAME DESC; ====== error ===== ORA-00904: "MONTH": invalid identifier ORA-00904: "FORMAT": invalid identifierarrow_forwardTask 3: The InstantRide Finance team wants to collect the price and discount information with the driver names for each travel in the system. You need to return the TRAVEL_ID, DRIVER_FIRST_NAME, DRIVER_LAST_NAME, TRAVEL_PRICE, and TRAVEL_DISCOUNT information from the TRAVELS and DRIVERS tables combined over DRIVER_ID field with the ON keyword. Task: Calculate each user's price and discount information. (SQL Database Test)arrow_forward
- Go to the w3schools website’s SQL browser IDE. This is where you canwrite and test your SQL code using their databases. Once you are happywith it, paste your code in a text file named Student.txt and save it in yourtask folder.● Write the SQL code to create a table called Student. The table structure issummarised in the table below (Note that STU_NUM is the primary key):Attribute Name Data TypeSTU_NUM CHAR(6)STU_SNAME VARCHAR(15)STU_FNAME VARCHAR(15)STU_INITIAL CHAR(1)STU_STARTDATE DATECOURSE_CODE CHAR(3)PROJ_NUM INT(2)● After you have created the table in question 1, write the SQL code to enterthe first two rows of the table as below:STU_NUMSTU_SNAMESTU_FNAMESTU_INITIALSTU_STARTDATECOURSE_CODEPROJ_NUM01 Snow John E 05-Apr-14 201 602 Stark Arya C 12-Jul-17 305 11● Assuming all the data in the Student table has been entered as shownbelow, write the SQL code that will list all attributes for a COURSE_CODE of305.…arrow_forwardTask 4: The InstantRide Finance team also wants to analyze travels where more than the average discount rate is applied. They want to look for any correlation between higher discount amounts against other travel characteristics. You need to create a SELECT statement which is filtered with a subquery to calculate the AVG of the TRAVEL_DISCOUNT column. Task: Find all travels where an above average discount was applied. (SQL Database Test)arrow_forwardModify the SELECT statement to select the title and release date of PG-13 movies that are released after February 1, 2008. Run your solution and verify the result table shows just the titles and release dates for The Dark Knight and Crazy Rich Asians. CREATE TABLE Movie ( ID INT AUTO_INCREMENT, Title VARCHAR(100), Rating CHAR(5) CHECK (Rating IN ('G', 'PG', 'PG-13', 'R')), ReleaseDate DATE, PRIMARY KEY (ID)); INSERT INTO Movie (Title, Rating, ReleaseDate) VALUES ('Casablanca', 'PG', '1943-01-23'), ('Bridget Jones\'s Diary', 'PG-13', '2001-04-13'), ('The Dark Knight', 'PG-13', '2008-07-18'), ('Hidden Figures', 'PG', '2017-01-06'), ('Toy Story', 'G', '1995-11-22'), ('Rocky', 'PG', '1976-11-21'), ('Crazy Rich Asians', 'PG-13', '2018-08-15'); -- Modify the SELECT statement:SELECT *FROM MovieWHERE ReleaseDate < '2000-01-01';arrow_forward
- i want the codes of create table and insert table only pleasearrow_forwardQ1 Please write SQL codes to query data from dvd table based on below criteria Please write a SELECT statement to display each DVD title with its # of copy in the DVD table. DVD titles must have at least two ‘A’s. Please display the result in descending order of title’s number copy. The result should be identical to below results: [screenshot] Here is the DVD TABLE: CREATE TABLE DVD ( dvd_ID NUMBER(4) NOT NULL, title_ID NUMBER(3) NOT NULL, title VARCHAR2(20) NOT NULL, status VARCHAR2(10) NOT NULL, CONSTRAINT dvd_pk PRIMARY KEY (dvd_ID)); this is all the data in the DVD table CREATE SEQUENCE DVD_SEQ START WITH 1000 INCREMENT BY 1 MINVALUE 1000 MAXVALUE 9999 NOCYCLE CACHE 50; INSERT INTO DVD VALUES (DVD_SEQ.nextval, 10, 'IN STORE', 'DANCE WITH WOLF');INSERT INTO DVD VALUES (DVD_SEQ.nextval, 10, 'IN STORE', 'DANCE WITH WOLF');INSERT INTO DVD VALUES (DVD_SEQ.nextval, 11, 'IN STORE', 'THE PERFECT STROM');INSERT INTO DVD VALUES (DVD_SEQ.nextval, 11, 'IN STORE', 'THE…arrow_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
- Write a SELECT statement that returns two columns basedon the EMPLOYEES table. Contact, is the employeelastname and the first initial of the first name. The secondcolumn, Phone, is the homephone without the area code.Only return rows for those employees in the 206 areacode, sort the results by the last name.arrow_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 Magazine table contains three fields. The Cost field is numeric. The Code and Name fields contain text. Write a SQL SELECT statement that selects only records that cost more than the first amount provided by the user but less than the second amount he or she provides.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 PtrNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY