This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Polytechnic Institute of NYU Feb 16, 2011 Computer Science and Engineering Department CS 308, Spring 2011 Prof. Phyllis Frankl HOMEWORK 2 Due: March 1, 9:30 a.m. Hand in the queries via MyPoly in a plain text file. Optionally, you can also hand in the results of executing the queries, in a separate file (including the queries and the results, and indicating which query goes with which homework question.) For each of the following, write an SQL query (or insert, or update, etc), execute it, and check that the result you get are correct. (To check, figure out by hand what the result should be, execute your query, and compare the result to your prediction.) PROBLEM I Use the University database with the initial data that you installed in HW1 for this problem. 1. Find the names of all the instructors from Comp. Sci. department 2. Find the names of courses in Computer science department which have 3 credits 3. For the student with ID 12345, show the course id and title of all courses the student has taken (or is taking). 4. For each grade (e.g. A, A-, ...) show the total number of courses in which student 12345 has gotten that grade and the number of credits for which the student has that grade.for which the student has that grade....
View Full Document