1. Report the student names and ages of all students who have a "hotmail" email address. Sort the results by age. 2. Report the number of male and female students.
1. Report the student names and ages of all students who have a "hotmail" email address. Sort the results by age. 2. Report the number of male and female students.
Chapter6: Additional Database Objects
Section: Chapter Questions
Problem 6HOA: A new table has been requested to support tracking automated emails sent to customers. Create the...
Related questions
Question
1. Report the student names and ages of all students who have a "hotmail" email address. Sort the results by age.
2. Report the number of male and female students.
![CREATE TABLE Students (
student_id int,
);
student_name varchar (50) NOT NULL,
gender char(1)
NULL,
age float NULL,
EMail varchar(40) NULL,
EntryDate date NULL
CREATE TABLE Professors (
prof_id int,
);
prof_name varchar (50) NOT NULL,
dept varchar(5) NULL,
officephone varchar(16) NULL,
EMail varchar(40) NULL,
webAddress varchar(40) NULL
);
CREATE TABLE Supervise (
prof_id int,
student_id int,
project varchar(10) NULL,
startdate date NULL
Insert Into Students Values (0001,
Insert Into Students Values (0002,
01");
Insert Into Students Values (0003,
Insert Into Students Values (0004,
03-01");
Insert Into Students Values (0005,
Insert Into Students Values (0006,
"2004-01-01");
"Tom", 'M', 19, "tom@yahoo.com", "2001-01-01");
"John", 'M', 20, "John@hotmail.com", "2001-06-
"Anmy", 'F', 15, "Anmy@gmail.com", "2003-01-01");
"Dustin", 'M', 24, "Dustin@hotmail.com", "2002-
"Mary", 'F', 22, "Mary@sbc.net", "2004-01-030");
"Jessica", 'F', 21, "Jessica@calstatela.edu",
"Rainy", 'M', 19, "rainy@calstatela.edu", "2004-
Insert Into Students Values (0007,
01-12");
Insert Into Students Values (0008, "Kelvin", 'M', 19, "Kelvin@calstatela.edu",
"2004-01-12");
Insert Into Professors Values(2001, "Scott", 'CS', "201-234-3213",
"scott@calstatela.edu", "www.calstatela.edu/faculty/scott/");
Insert Into Professors Values (2002, "David", 'CE', "201-234-3112",
"david@calstatela.edu", "www.calstatela.edu/faculty/david/");
Insert Into Professors Values (2003, "Judy", 'CE', "201-234-3002",
"Judy@calstatela.edu", "www.calstatela.edu/faculty/Judy/");
Insert Into Professors Values (2004, "Gerald", 'CS', "201-234-3102",
"Gerald@calstatela.edu", "www.calstatela.edu/faculty/Gerald/");](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F286060ef-b6f0-4e93-baf7-6d09e677932d%2F88d3b573-7d64-49f0-bce6-8d0f77df2820%2Fndkt3nb8_processed.png&w=3840&q=75)
Transcribed Image Text:CREATE TABLE Students (
student_id int,
);
student_name varchar (50) NOT NULL,
gender char(1)
NULL,
age float NULL,
EMail varchar(40) NULL,
EntryDate date NULL
CREATE TABLE Professors (
prof_id int,
);
prof_name varchar (50) NOT NULL,
dept varchar(5) NULL,
officephone varchar(16) NULL,
EMail varchar(40) NULL,
webAddress varchar(40) NULL
);
CREATE TABLE Supervise (
prof_id int,
student_id int,
project varchar(10) NULL,
startdate date NULL
Insert Into Students Values (0001,
Insert Into Students Values (0002,
01");
Insert Into Students Values (0003,
Insert Into Students Values (0004,
03-01");
Insert Into Students Values (0005,
Insert Into Students Values (0006,
"2004-01-01");
"Tom", 'M', 19, "tom@yahoo.com", "2001-01-01");
"John", 'M', 20, "John@hotmail.com", "2001-06-
"Anmy", 'F', 15, "Anmy@gmail.com", "2003-01-01");
"Dustin", 'M', 24, "Dustin@hotmail.com", "2002-
"Mary", 'F', 22, "Mary@sbc.net", "2004-01-030");
"Jessica", 'F', 21, "Jessica@calstatela.edu",
"Rainy", 'M', 19, "rainy@calstatela.edu", "2004-
Insert Into Students Values (0007,
01-12");
Insert Into Students Values (0008, "Kelvin", 'M', 19, "Kelvin@calstatela.edu",
"2004-01-12");
Insert Into Professors Values(2001, "Scott", 'CS', "201-234-3213",
"scott@calstatela.edu", "www.calstatela.edu/faculty/scott/");
Insert Into Professors Values (2002, "David", 'CE', "201-234-3112",
"david@calstatela.edu", "www.calstatela.edu/faculty/david/");
Insert Into Professors Values (2003, "Judy", 'CE', "201-234-3002",
"Judy@calstatela.edu", "www.calstatela.edu/faculty/Judy/");
Insert Into Professors Values (2004, "Gerald", 'CS', "201-234-3102",
"Gerald@calstatela.edu", "www.calstatela.edu/faculty/Gerald/");
![Insert Into Professors Values (2005, "Charlie", 'CIS', "201-234-3291",
"Charlie@calstatela.edu",
"www.calstatela.edu/faculty/Charlie/");
Insert Into Professors Values (2006, "Jennifer", 'CIS', "201-234-3621",
"Jennifer@calstatela.edu", "www.calstatela.edu/faculty/Jennifer/");
Insert Into Professors Values (2007, "Jason", 'CIS', "201-234-3921",
"www.calstatela.edu/faculty/Jason/");
"Jason@calstatela.edu",
Insert Into Supervise Values (2001, 0001, "project01", "2002-02-01");
Insert Into Supervise Values (2001, 0002, "project01", "2002-03-01");
Insert Into Supervise Values (2001, 0003, "project02", "2002-03-01");
Insert Into Supervise Values (2002, 0005, "project03", "2002-09-01");
Insert Into Supervise Values (2002, 0006, "project04", "2005-11-01");
Insert Into Supervise Values (2003, 0004, "project05","2003-10-01");
Insert Into Supervise Values (2003, 0004, "project06", "2004-10-01");](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F286060ef-b6f0-4e93-baf7-6d09e677932d%2F88d3b573-7d64-49f0-bce6-8d0f77df2820%2Fank3ztp_processed.png&w=3840&q=75)
Transcribed Image Text:Insert Into Professors Values (2005, "Charlie", 'CIS', "201-234-3291",
"Charlie@calstatela.edu",
"www.calstatela.edu/faculty/Charlie/");
Insert Into Professors Values (2006, "Jennifer", 'CIS', "201-234-3621",
"Jennifer@calstatela.edu", "www.calstatela.edu/faculty/Jennifer/");
Insert Into Professors Values (2007, "Jason", 'CIS', "201-234-3921",
"www.calstatela.edu/faculty/Jason/");
"Jason@calstatela.edu",
Insert Into Supervise Values (2001, 0001, "project01", "2002-02-01");
Insert Into Supervise Values (2001, 0002, "project01", "2002-03-01");
Insert Into Supervise Values (2001, 0003, "project02", "2002-03-01");
Insert Into Supervise Values (2002, 0005, "project03", "2002-09-01");
Insert Into Supervise Values (2002, 0006, "project04", "2005-11-01");
Insert Into Supervise Values (2003, 0004, "project05","2003-10-01");
Insert Into Supervise Values (2003, 0004, "project06", "2004-10-01");
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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.Recommended textbooks for you
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr