SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rafinha
Starting Member

1 Posts

Posted - 07/19/2013 :  10:56:12  Show Profile  Reply with Quote
Hello everyone ..i had a couple of questions that i needed help on ..basically coming up with an sql query fpr each of these ..

1. Print the names of professors who work in departments that have fewer than 50 PhD students.
2. Print the name(s) of student(s) with the lowest gpa.
3. For each Computer Sciences class, print the cno, sectno, and the average gpa of the students enrolled in the class.
4. Print the course names, course numbers and section numbers of all classes with less than six students enrolled in them.
5. Print the name(s) and sid(s) of the student(s) enrolled in the most classes.
6. Print the names of departments that have one or more majors who are under 18 years old.
7. Print the names and majors of students who are taking one of the College Geometry courses. (Hint: You'll need to use the "like" predicate and the string matching character in your query.)
8. For those departments that have no majors taking a College Geometry course, print the department name and the number of PhD students in the department.
9. Print the names of students who are taking both a Computer Sciences course and a Mathematics course.
10. Print the age difference between the oldest and youngest Computer Sciences major(s).
11. For each department that has one or more majors with a GPA under 1.0, print the name of the department and the average GPA of its majors.
12. Print the ids, names, and GPAs of the students who are currently taking all of the Civil Engineering courses.

Many thanks

SwePeso
Patron Saint of Lost Yaks

Sweden
30218 Posts

Posted - 07/19/2013 :  10:57:47  Show Profile  Visit SwePeso's Homepage  Reply with Quote
We normally don't do homework here.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 07/20/2013 :  08:14:51  Show Profile  Reply with Quote
All these are pretty straightforward questions. Suggest to read and understand basic concepts of sql like JOINs,GROUP BY etc


http://www.w3schools.com/sql/default.asp



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000