| CS
2550 |
SQL Assignment
#1
SQL SELECT statement
|
Perform SQL SELECT statements using DISTINCT, WHERE and ORDER BY
Description
Write
a series of Oracle SQL query statements using the Student database which consists of the schema defined in Appendix D of your text.
This assignment will be completed using Oracle. The CS Athena remote terminal server has both SQLDeveloper and SQL*Plus installed and available for student use.
Instructions for connecting to the CS Oracle Server through the remote terminal server can be found at http://rbhilton.com/wsucs/cs2550/CS2550ConnectionInstructions.pdf
Complete the assignment by performing the following
- Connect to the WSU/CS Oracle Server, or any other available Oracle server.
Instructions for connecting to terminal server and logging on to SQL*Developer will be posted.
General instructions for using SQL Developer are contained in Lab 2.3 of your text.
- Create a notepad text file named CS2550SQL01.txt. Put your name and assignment information at the top of the file.
Paste each of your SQL statements into the file, numbering each one.
Make sure that each SQL statement is terminated with a semi-colon.
It is essential that your submitted file is named as specified.
- Complete the following Queries:
- List the names (first and last name) of all instructors.
- Provide a list of distinct course numbers that are being taught as sections.
- List the names of Instructors with a first name starting with "T".
- List the phone number, full name (as one column) and employer for all students with a last name of "Miller".
- List the course number and course description of all courses that have a prerequisite of course 20 .
- List the course number, description and cost for all 200 level courses costing less than $1100.
- List the course number and section id for all 100 level courses taught in room L509 or L214 .
- List the course number and section id for classes with a capacity of 15 or 20 (use the IN clause).
Order the list by course number and section id.
- List the student id and grade for all of the quiz scores (QZ) in section id 147.
Arrange the list by student id and grade.
- List the course number and description for all courses with a prerequisite, arranged on course description .
Ensure that your final assignment text file contains your name, course and assignment number
and
only the SQL statement for each query. Do not include items such as the query description or query results.
Each query MUST be terminated with a semi-colon or it will be marked as incorrect.
Numbering each query is helpful for grading purposes, but not required.
Upload the completed query file CS2550SQL01.txt using the Assignment
Uploader prior to the due date.
Note that the uploaded file must be named correctly in order to receive credit for the assignment.