If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Nested Query Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-06-03, 20:38
Sanny Sanny is offline
Registered User
 
Join Date: Aug 2003
Posts: 2
Exclamation Nested Query Question

Hi, ive have made an sql query which has a nested query -

select distinct FamilyName, FirstNames
from student as s, course as c, enrollments as e
where c.Dept = 'Math' and c.Points = 10
and s.IdNum = e.IdNum and e.Dept = c.Dept
and e.Year = 2003 and
e.IdNum in (select IdNum from enrollments as e
where e.Dept = 'COMP' and e.Code = '319' and e.Year = 2003 and e.Semester = 'B')

I am stuck on how to write an relational algebra expression for the following query. I know how to write R A expressions with just one query, but this one has 2 selects in it.

Can someone please help me out. Thanks for any help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On