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.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
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...
icon
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/");
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");
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
SQL Functions
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr