Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Need help for creating couple SQL queries

Author  Topic 

dejansoftware
Starting Member

1 Post

Posted - 2009-08-29 : 10:56:29
Need help for creating SQL Queries from 4 tables:

Table: Students
index# PK
Name
Surname

Table: Exams
index#
subject#
Grade

Table: Subjects
subject# PK
Subject_name
profesor#

Table: Profesors
profesor# PK
Name
Surname
Town

And the queries are:

1. Who are the professors who are teaching more than 2 subjects
2. Who are the students who have grade A from Visual Basic
3. How many students passed Visual Basic
4. Who is the professor who gave the most E grades
5. What is the name of the student who passed lowest number of subjects
6. What is the avarage grade of Dejan

Please help me to solve this.

Thanks

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2009-08-29 : 11:02:37
Homework?



An infinite universe is the ultimate cartesian product.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-08-29 : 11:12:15
what have you tried ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -