Modify 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 Movie
WHERE ReleaseDate < '2000-01-01';
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- Jump to level Complete the following statement to create a table named Country. Choose data types based on the following requirements: ISOCode3 stores the country's code, consisting of one to three letters. • IndepDate stores the country's independence date. CREATE TABLE Country ); ( ISOCode 3 /* Your code goes here */ IndepDate /* Your code goes here */ Enter a statement to delete the above table. /* Your code goes here */ ;arrow_forwardTask 7: The StayWell marketing team considers sending small gifts to all residents and owners. To decrease the postal costs, they will send gifts to owners in batches to their corresponding offices. Similarly, the marketing team will send the gifts in groups to the residents living in the same property. Therefore, you will need to provide them the number of gifts for each StayWell office and number of gifts for each property. The column headers for the first table should be OFFICE_NUM and GIFTS, the column headers for the second table should be PROPERTY_ID and GIFTS. Provide the StayWell team the number of gifts for each office. Provide the StayWell team the number of gifts for each residence.arrow_forward4. Update the name of the student to "John Doe" where its id is 10. Enter your answer 5. Modify the "student" table by adding "address" column/field as string and allows null.arrow_forward
- StayWell’s maintenance team wants to recheck the apartments that had plumbing service requests beforehand. You will need to return all the property IDs and the addresses of the properties that had plumbing service request (CATEGORY_NUMBER 1). Task Return a list of all the property IDs and the addresses of the properties that had plumbing service requests.arrow_forwardInsert any 5 rows of athletes including your details into the Athletics table you created in the previous Question. The table created previously CREATE TABLE Athletics ( AthleteID int NOT NULL First_name varchar(255) NOT NULL, Last_name varchar(255) NOT NULL, DOB DATE NOT NULL, SportsCode INT, Date_Last_event DATE, PRIMARY KEY (ID) ); varchar(255) use for define string column, int stand for integer field etc.arrow_forwardTask 12: When deleting a customer, subtract the balance multiplied by the sales rep’s commission rate from the commission for the corresponding sales rep.arrow_forward
- 1) Write the SQL code to add a column that shows the full name of the Employee in the Employee Table. The expecting format should be “Firstname Initial Lastname” (e.g., “John G News” for the EMP_NUM 101) 2) Write the SQL code to add a binary variable “Hire_prior_2000” in the Employee table. If the hire year (year of hire needs to be identified) is prior to 2000, then Hire_prior_2000=1, other wise Hire_prior_2000=0.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_forwardYou want to use the summarize() and max() functions to find the maximum rating for your data. Add the code chunk that lets you find the maximum value for the variable Rating.arrow_forward
- Create lookup functions to complete the summary section. In cell I6, create a formula using the VLOOKUP function to display the number of hours worked in the selected week. Look up the week number in cell I5 in the range A17:G20, and return the value in the 2nd column. Use absolute references for cell I5 and the range A17:G20.arrow_forwardUsing the Winners table from Figure 12-2, write a SELECT statement that selectsthe Actor and Actress fields for the years 2008 through 2010. Sort the records indescending order by the Year field.arrow_forwardThe InstantRide Driver Relationship team wants to learn how many travels each driver has done in the month of October. You need to send them the DRIVER_ID, and two calculated columns: DAY and RIDES. The DAY column is calculated using the DAY() function with the TRAVEL_START_TIME as the argument. The RIDES column is calculated by using the COUNT() function to determine the number of rides given for each day. Filter the results with the MONTH function.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education