Lösung zu Blatt 1 --- Software Engineering Praxis (SS 2002)
Daten, nichts als Daten
update Person set diab = NULL where diab = "0000-00-00";
select distinct p.persid from Person p, Text t
where p.persid = t.persid and p.diab is not NULL;
select p1.name, p2.name, p1.birth from Person p1, Person p2
where p1.birth = p2.birth and p1.persid < p2.persid order by 3;
select p.first, p.name, e.date, e.hba1c, u.ualbumin
from Person p, Examination e, Ualbumin u
where p.persid = e.persid and p.persid = u.persid and e.date = u.date
and e.hba1c is not NULL
order by 1,2,3 desc;
select p.first, p.name, count(e.persid) as sum
from Person p natural left join Examination e
where e.hba1c is not NULL group by e.persid having sum > 40 order by 3;
Ingo Melzer, 25. April 2002