Need SQL Experts Help : Create View !!!!!!!!

From: Eric , Chow Hoi Ka <d951686_at_sftw.umac.mo>
Date: 1998/03/18
Message-ID: <350EC1B2.E79F00D1_at_sftw.umac.mo>#1/1


Hello, SQL Experts,
I meet some problem in creating views. Could you please to help me ?

The following are the Tables :
1) Student

  • Student#
  • Name
  • Faculty
  • Major
  • Address 2) Course
  • Course#
  • Title
  • Credits 3) Grade
    • Student#
    • Course#
    • Grade

Questions :
1) How to create a VIEW that shows

  • Course#
  • TotEnrol => the total number of enrolled students in a COURSE
  • NumFac => the number of different FACULTIES that enrolled students are from (for example, if two students from FST and one from FBA are enrolled in a course, then the NumFac should be 2)
  • NumMaj => same as NumFac, but is will shows the total number of different Majors that the enrolled students are from

I am sincerely to ask all the EXPERTS for help !!!!!!! I think it is very easy for those experience SQL EXPERTS.

Best regards,
Eric

--

     _  |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|  _
    / ) |     Eric, Chow Hoi Ka            ICQ# : 3463514     | ( \
   / /  |                                                     |  \ \
 _( /_  | _   ICQ-Page : http://wwp.mirabilis.com/3463514   _ |  _) )_
(((\ \> |/ )                                               ( \| </ /)))
(\\\\ \_/ /   E-Mail : d951686_at_sftw.umac.mo                 \ \_/ ////)
 \       /                                                   \        /
  \    _/     http://www.sftw.umac.mo/~d951686/               \_     /
  /   / |_____________________________________________________| \    \
 /   /                                                           \    \
Received on Wed Mar 18 1998 - 00:00:00 CET

Original text of this message