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

Annotation of /uni/COMP2400/q4.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Mon Aug 9 12:40:39 2004 UTC (18 years, 1 month ago) by apollock
Branch: MAIN
Changes since 1.1: +7 -1 lines
Cleaned up working queries

1 apollock 1.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 apollock 1.2 ALTER SESSION SET NLS_DATE_FORMAT = 'DD/MM/YYYY';
8    
9     COLUMN Name HEADING 'Name'
10     COLUMN BirthDate HEADING 'Birthdate'
11     COLUMN AgeAtDeath HEADING 'Age at death'
12    
13     SELECT Firstname || ' ' || Surname AS NAME, BirthDate, ROUND((DeathDate - BirthDate) / 365, 1) AS AgeAtDeath
14 apollock 1.1 FROM Person
15     WHERE DeathDate IS NOT NULL
16     ORDER BY BirthDate;

  ViewVC Help
Powered by ViewVC 1.1.22