0% found this document useful (0 votes)
53 views3 pages

Lesson Objective:: Student Activity 3.1A Key: Utilizing Select With Simple

This document provides an example of utilizing SELECT queries to extract data from a student information database table. It includes 6 sample SELECT queries run against the table with different WHERE clauses to filter the results. The queries select different columns, apply filtering based on state, sex, and name values, and order the results. The output of each query is displayed to demonstrate the data returned.

Uploaded by

Carlos Díaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views3 pages

Lesson Objective:: Student Activity 3.1A Key: Utilizing Select With Simple

This document provides an example of utilizing SELECT queries to extract data from a student information database table. It includes 6 sample SELECT queries run against the table with different WHERE clauses to filter the results. The queries select different columns, apply filtering based on state, sex, and name values, and order the results. The output of each query is displayed to demonstrate the data returned.

Uploaded by

Carlos Díaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

98-364 DATABASE ADMINISTRATION FUNDAMENTALS

STUDENT ACTIVITY 3.1A KEY: UTILIZING SELECT WITH SIMPLE


QUERIES

MTA Course: Database Administration Fundamentals


Topic: Select data
File name: DBAdminFund_SA_3.1a_Key

Lesson Objective:
3.1a: Select data. This objective may include but is not limited to: utilizing SELECT
queries to extract data from one table.

Utilizing SELECT with Simple Queries

Content:
Apply the following SELECT statements to the following data. Record the results in the
table view provided.
Student Id Last_ Name First_Name Birthday Sex State
1243 Holt Holly 10-5-1990 F AZ
2435 Houston Peter 1-25-1991 M NV
3756 Raheem Michael 6-18-1990 M CA
4456 Jacobsen Lola 8-7-1997 F AZ
5865 Higa Sidney 11-21-2000 F CA
6674 Johnson Brian 4-15-1989 M NV
7456 Bentley Sean 2-17-1990 M MT
8934 Price Jeff 10-5-1990 M AZ
98-364 DATABASE ADMINISTRATION FUNDAMENTALS

Student_Info
1. SELECT StudentId FROM Student_Info
Student Id
1243
2435
3756
4456
5865
6674
7456
8934
2. SELECT DISTINCT State FROM Student_Info
State
AZ
NV
CA
MT

3. SELECT Last_ Name, First_Name, Birthday FROM Student_Info WHERE


State = AZ
Last_ Name First_Name Birthday
Holt Holly 10-5-1990
Jacobsen Lola 8-7-1997
Price Jeff 10-5-1990

4. SELECT * FROM Student_Info ORDER BY Birthday


Student Id Last_ Name First_Name Birthday Sex State
6674 Johnson Brian 4-15-1989 M NV
7456 Bentley Sean 2-17-1990 M MT
3756 Raheem Michael 6-18-1990 M CA
1243 Holt Holly 10-5-1990 F AZ
8934 Price Jeff 10-5-1990 M AZ
2435 Houston Peter 1-25-1991 M NV
4456 Jacobson Lola 8-7-1997 F AZ
5865 Higa Sidney 11-21-2000 F CA
98-364 DATABASE ADMINISTRATION FUNDAMENTALS

5. SELECT StudentId,Last_Name, First_Name, Sex FROM Student_Info


WHERE State = “CA” AND Sex = “M”
Student Id Last_ Name First_Name Sex
3756 Raheem Michael M

6. SELECT StudentId,Last_Name, First_Name, Birthday FROM Student_Info


WHERE sex = “F” OR First_Name = “Holly”
Student Id Last_ Name First_Name Birthday
1243 Holt Holly 10-5-1990
4456 Jacobsen Lola 8-7-1997
5865 Higa Sidney 11-21-2000
8934 Price Jeff 10-5-1990

You might also like