- For each of the given standard normal distributions, find the -score (critical value) corresponding
to the indicated shaded area. Round to two decimal places.
a) 0.9591
b) 0.7157
-According to the National Center for Education Statistics, the mean SAT score for the math
portion in the United States in 2021 was = 528 with a standard deviation of = 120.
a) To join the Mathletes competition team, applicants must score in the 95th percentile on the SAT
math test. What is the minimum SAT math score required to join the Mathletes? Round to the
nearest whole number.
b) If a government program offers financial aid for those who score below the 30th percentile, does
a
score of 450 qualify for financial aid? Support your answer with mathematical reasoning.
(6 points) For each of the given standard normal distributions, find the z-score (critical value)
corresponding to the indicated shaded area. Round to two decimal places. a) b) (10 points)
According to the National Center for Education Statistics, the mean SAT score for the ma portion
in the United States in 2021 was =528 with a standard deviation of =120. a) To join the "Mathletes"
competition team, applicants must score in the 95th percentile on the S math test. What is the
minimum SAT math score required to join the Mathletes? Round to the nearest whole number. b)
If a government program offers financial aid for those who score below the 30th percentile, doe
score of 450 qualify for financial aid? Support your answer with mathematical reasoning..
1. -- Table `Region`
-- -----------------------------------------------------
CREATE DATABASE tourista_db;
USE tourista_db;
SET AUTOCOMMIT = 0;
SET FOREIGN_KEY_CHECKS=0;
START TRANSACTION;
-- START TRANSACTION;
DROP TABLE IF EXISTS `Booking` ;
DROP TABLE IF EXISTS `Cottage_Facility` ;
DROP TABLE IF EXISTS `Facility` ;
DROP TABLE IF EXISTS `Cottage` ;
DROP TABLE IF EXISTS `Customer` ;
DROP TABLE IF EXISTS `Region` ;
CREATE TABLE IF NOT EXISTS `Region` (
`Region_Code` INT NOT NULL,
`Region_Name` VARCHAR(45) NOT NULL,
PRIMARY KEY (`Region_Code`)
);
-- -----------------------------------------------------
-- Table `Customer`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Customer` (
`Customer_ID` INT NOT NULL,
`Customer_LName` VARCHAR(45) NOT NULL,
`Customer_FName` VARCHAR(45) NOT NULL,
`Customer_MInitial` VARCHAR(5) NULL,
`Customer_Email` VARCHAR(45) NULL,
`Customer_Phone` VARCHAR(15) NULL,
PRIMARY KEY (`Customer_ID`)
);
-- -----------------------------------------------------
-- Table `Facility`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Facility` (
`Facility_ID` INT NOT NULL,
`Facility_Name` VARCHAR(45) NOT NULL,
`Facility_IsShared` TINYINT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`Facility_ID`)
);
-- -----------------------------------------------------
-- Table `Cottage`
2. -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Cottage` (
`Cottage_ID` INT NOT NULL,
`Cottage_Name` VARCHAR(45) NOT NULL,
`Cottage_NumRooms` INT NOT NULL,
`Region_Code` INT NOT NULL,
PRIMARY KEY (`Cottage_ID`),
CONSTRAINT `fk_Cottage_Region`
FOREIGN KEY (`Region_Code`)
REFERENCES `Region` (`Region_Code`)
);
-- -----------------------------------------------------
-- Table `Cottage_Facility`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Cottage_Facility` (
`CF_Num` INT NOT NULL,
`Facility_ID` INT NOT NULL,
`Cottage_ID` INT NOT NULL,
PRIMARY KEY (`CF_Num`),
CONSTRAINT `fk_Cottage_Facility_Facility1`
FOREIGN KEY (`Facility_ID`)
REFERENCES `Facility` (`Facility_ID`),
CONSTRAINT `fk_Cottage_Facility_Cottage1`
FOREIGN KEY (`Cottage_ID`)
REFERENCES `Cottage` (`Cottage_ID`)
);
-- -----------------------------------------------------
-- Table `Booking`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Booking` (
`Booking_ID` INT NOT NULL,
`Booking_Date` DATE NOT NULL,
`Booking_Price` INT NOT NULL,
`Customer_ID` INT NOT NULL,
`Cottage_ID` INT NOT NULL,
PRIMARY KEY (`Booking_ID`),
CONSTRAINT `fk_Booking_Customer1`
FOREIGN KEY (`Customer_ID`)
REFERENCES `Customer` (`Customer_ID`),
CONSTRAINT `fk_Booking_Cottage1`
FOREIGN KEY (`Cottage_ID`)
REFERENCES `Cottage` (`Cottage_ID`)
3. );
-- -----------------------------------------------------
-- Data Insertion
-- -----------------------------------------------------
insert into Region values (7821,'Halifax');
insert into Region values (7822,'Bear River');
insert into Region values (7823,'Pictou');
insert into Region values (9021,'Sherbrooke');
insert into Region values (9022,'Digby');
insert into Region values (9023,'Kingston');
insert into Region values (9024,'Shelburne');
insert into Cottage values (1,'Atlantic Beach Resort Cottage 1',4,9021);
insert into Cottage values (2,'Atlantic Beach Resort Cottage 2',3,9021);
insert into Cottage values (3,'Atlantic Beach Resort Cottage 3',2,9021);
insert into Cottage values (4,'Green Ocean Cottage 20',3,9024);
insert into Cottage values (5,'Green Ocean Cottage 30',2,9024);
insert into Cottage values (6,'Green Ocean Cottage 40',1,9024);
insert into Cottage values (7,'Surf Cottage 1',2,7821);
insert into Cottage values (8,'Surf Cottage 2',3,7821);
insert into Cottage values (9,'Lagoona',4,7823);
insert into Cottage values (10,'Pine Resort A',1,9021);
insert into Customer values (10010,'DalFCS','Student','','myemail@mymail.com','9021234567');
insert into Customer values (10011,'Perkins','Bob','','bob@whatmail.ca','5901293456');
insert into Customer values (10012,'Oscar','Charlie','','coscar@nomail.org','6222257079');
insert into Customer values (10013,'Sybil','Dave','G','devensy007@mymail.com','4140069876');
insert into Customer values (10014,'Evenfield','Eve','S.Y','eve@whymail.ca','2121129987');
insert into Customer values (10015,'Mitchell','Frank','','frankmitchell@nomail.org','2134567890');
insert into Customer values (10016,'Damon','Grace','K','gracep@mymail.com','9024346565');
insert into Customer values (10017,'Singh','Robin','C','rsingh@yahoo.com ','9011237745');
insert into Facility values (1,'Coffee Machine',0);
insert into Facility values (2,'Refrigerator',0);
insert into Facility values (3,'Air Conditioner',0);
insert into Facility values (4,'Stove',0);
insert into Facility values (5,'Parking',0);
insert into Facility values (6,'Pool',1);
insert into Facility values (7,'Playground',1);
insert into Facility values (8,'Gym',1);
insert into Facility values (9,'Sauna',1);
insert into Facility values (10,'Beach',1);
insert into Cottage_Facility values (1,1,1);
insert into Cottage_Facility values (2,2,1);
insert into Cottage_Facility values (3,3,1);
insert into Cottage_Facility values (4,1,2);
4. insert into Cottage_Facility values (5,2,2);
insert into Cottage_Facility values (6,3,2);
insert into Cottage_Facility values (7,1,3);
insert into Cottage_Facility values (8,2,3);
insert into Cottage_Facility values (9,3,3);
insert into Cottage_Facility values (10,6,3);
insert into Cottage_Facility values (11,7,3);
insert into Cottage_Facility values (12,10,3);
insert into Cottage_Facility values (13,1,9);
insert into Cottage_Facility values (14,6,9);
insert into Cottage_Facility values (15,10,9);
insert into Cottage_Facility values (16,1,10);
insert into Cottage_Facility values (17,10,10);
insert into Cottage_Facility values (18,2,4);
insert into Cottage_Facility values (19,5,4);
insert into Booking values (1,'2018/01/15',594,10010,9);
insert into Booking values (2,'2018/01/15',384,10015,1);
insert into Booking values (3,'2018/01/15',1176,10012,4);
insert into Booking values (4,'2018/01/10',300,10010,3);
insert into Booking values (5,'2018/01/10',144,10011,3);
insert into Booking values (6,'2018/01/01',144,10016,3);
insert into Booking values (7,'2017/12/24',654,10010,9);
insert into Booking values (8,'2017/12/22',654,10014,9);
insert into Booking values (9,'2017/12/20',588,10012,7);
insert into Booking values (10,'2017/12/15',180,10010,10);
Q1)
Alice also wants to see how many times each of Touristas cottages have been booked. This will
help her to separate popular cottages from the not-so-popular ones. She wants you to provide a
list with the names of all cottages, the number of times they have been booked (0 if never booked)
and their average booking price. It would make more sense to her if the output is sorted by
number of bookings in descending order and then by cottage name in ascending order.
You also decide to use the alias Booked for the number of times a cottage has been booked, and
Average Price for the average booking price output column.
Q2) Touristas CEO is also concerned that cottages in some regions are not very profitable. She
wants a list of all region names where none of the cottages were ever booked for a price over 500.
(Note: Your list should exclude Regions with no cottages).