Question about sql?

Good morning every body.. I am really need your help ASAP. pleeeeeese my dears. I work on .net program but I get stock in point. I need help in sql command.

I have tables:

  • Rechearch_Group: Group_ID, Group_Name, GroupPI_ID...
  • Faculty: Faculty_ID, Faculty_name...
  • Student_group: student_id, Group_id.
  • Student: Student_ID, student_name...

notes: GroupPI_ID is same as Faculty_ID

how can write statement that retrieve groupName, student who participate in this group, and GroupPI_ID (faculty_ID)?

I hope you understand my question.

please help me in my senior project.

more ▼

asked Apr 30, 2010 at 04:18 AM in Default

avatar image

life Smile
9 1 1 3

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

select f.Faculty_name, rg.Group_Name, s.student_name
from Student_group sg
inner join Student s on s.Student_id = sg.Student_id
inner join Rechearch_Group rg on rg.Group_ID = sg.Group_ID
inner join Faculty f on f.Faculty_ID = rg.GroupPI_ID
order by f.Faculty_name, rg.Group_Name, s.student_name
more ▼

answered Apr 30, 2010 at 04:44 AM

avatar image

David Wimbush
10.7k 31 34 44

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Apr 30, 2010 at 04:18 AM

Seen: 1137 times

Last Updated: Apr 30, 2010 at 05:19 AM

Copyright 2018 Redgate Software. Privacy Policy