2.9- Create a Movie table with the following columns:
ID – positive integer with maximum value of 50,000
Title – variable-length string with up to 50 characters
Rating – fixed-length string with 4 characters
ReleaseDate – date
Budget – decimal value representing a cost of up to 999,999 dollars, with 2 digits for cents
2.10-The 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.
2.11-The Horse table has the following columns:
ID – integer, auto increment, primary key
RegisteredName – variable-length string
Breed – variable-length string, must be one of the following: Egyptian Arab, Holsteiner, Quarter Horse, Paint, Saddlebred
Height – decimal number, must be between 10.0 and 20.0
BirthDate – date, must be on or after Jan 1, 2015
Insert the following data into the Horse table:
RegisteredName Breed Height BirthDate
Babe Quarter Horse 15.3 2015-02-10
Independence Holsteiner 16.0 2017-03-13
Ellie Saddlebred 15.0 2016-12-22
NULL Egyptian Arab 14.9 2019-10-12
Notes:
Your SQL code does not display any results in Develop mode. Use Submit mode to test your code.
In another lab that creates the Horse table, RegisteredName is NOT NULL. In this lab, NULL is allowed in this column.
2.12 -The Horse table has the following columns:
ID – integer, auto increment, primary key
RegisteredName – variable-length string
Breed – variable-length string, must be one of the following: Egyptian Arab, Holsteiner, Quarter Horse, Paint, Saddlebred
Height – decimal number, must be ≥ 10.0 and ≤ 20.0
BirthDate – date, must be ≥ Jan 1, 2015
Make the following updates:
Change the height to 15.6 for horse with ID 2.
Change the registered name to Lady Luck and birth date to May 1, 2015 for horse with ID 4.
Change every horse breed to NULL for horses born on or after December 22, 2016.
Note: Your SQL code does not display any results in Develop mode. Use Submit mode to test your code.
2.13- The Horse table has the following columns:
ID – integer, auto increment, primary key
RegisteredName – variable-length string
Breed – variable-length string
Height – decimal number
BirthDate – date
Delete the following rows:
Horse with ID 5.
All horses with breed Holsteiner or Paint.
All horses born before March 13, 2013.
Note: Your SQL code does not display any results in Develop mode. Use Submit mode to test your code.
Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount