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

Diff of /uni/COMP2400/q6.sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by apollock, Wed Aug 11 01:46:15 2004 UTC revision 1.5 by apollock, Wed Aug 11 22:48:11 2004 UTC
# Line 6  Line 6 
6    
7  -- Find the couple(s) with the most children  -- Find the couple(s) with the most children
8    
9  TTITLE "COMP2400: Assignment 1: Question 6"  TTITLE "COMP2400: Assignment 1: Question 6|Andrew Pollock (4137129)"
10    
11  COLUMN Mother HEADING "Mother"  COLUMN Mother HEADING "Mother"
12  COLUMN Father HEADING "Father"  COLUMN Father HEADING "Father"
13    COLUMN Children HEADING "Number|of children"
14    
15  SELECT mother.firstname || ' ' || mother.surname AS Mother, father.firstname || ' ' || father.surname AS Father  SELECT mother.firstname || ' ' || mother.surname AS Mother, father.firstname || ' ' || father.surname AS Father, COUNT(p.personid) AS Children
16  FROM parents p, person mother, person father  FROM parents p, person mother, person father
17  WHERE p.motherid = mother.personid  WHERE p.motherid = mother.personid
18  AND p.fatherid = father.personid  AND p.fatherid = father.personid

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22