/[cvs.andrew.net.au]/uni/COMP2400/q7.sql
ViewVC logotype

Contents of /uni/COMP2400/q7.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Wed Aug 11 22:48:11 2004 UTC (18 years ago) by apollock
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +8 -2 lines
Base questions ready for submission

1 -- I have read the ANU Code on "Academic Honesty in Learning and Teaching",
2 -- and I declare that, except where appropriately attributed, the content
3 -- of the file I have submitted for this assignment is entirely my own
4 -- work. It has not been produced, in whole or in part, by another person.
5 -- (signed) Andrew Pollock 4137129
6
7 TTITLE "COMP2400: Assignment 1: Question 7|Andrew Pollock(4137129)"
8
9 COLUMN GRANDCHILD FORMAT A15 HEADING "Grandchild"
10 COLUMN GRANDFATHER FORMAT A20 HEADING "Grandfather"
11 COLUMN GRANDMOTHER FORMAT A20 HEADING "Grandmother"
12
13 BREAK ON GRANDCHILD
14
15 SELECT child.firstname || ' ' || child.surname AS GrandChild, grandfather.firstname || ' ' || grandfather.surname AS grandfather, grandmother.firstname || ' ' || grandmother.surname AS Grandmother
16 FROM parents p, person mother, person father, person child, person grandmother, person grandfather, parents p2, person grandchild
17 WHERE p.personid = child.personid
18 AND father.personid = p.fatherid
19 AND mother.personid = p.motherid
20 AND p2.personid = grandchild.personid
21 AND grandfather.personid = p2.fatherid
22 AND grandmother.personid = p2.motherid
23 AND (p2.personid = p.motherid OR p2.personid = p.fatherid) -- Brain haemorrhage occurred at this point
24 AND p.personid = '&1';
25
26 EXIT

  ViewVC Help
Powered by ViewVC 1.1.22