Subject | Re: [ib-support] Group by behavior |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2002-10-25T08:15:11Z |
At 16:00 24.10.2002 +0200, you wrote:
select d.PlannedAssessor,
(select count(*) from DAR d2
inner join ACCIDENTCLAIMPROCESS a on d2.darno=a.darno
where d2.plannedAssessor <> a.assessor AND d2.plannedAssessor =
d.plannedAssessor) AS DidNotMakeAppointMent,
count(distinct darno) as AssesmentCount,
(select count(*)
from DAR d3 inner join ACCIDENTCLAIMPROCESS a2 on d3.darno=a2.darno
where d3.Assessor_DT > a2.ASSESSMENTDATE and
d3.plannedAssessor=d.plannedAssessor) AS UnknownColumnName
FROM DAR d
GROUP BY d.PlannedAssessor
HTH,
Set
>My only problem left is to join the 3 views in one statement I amSure, but only through subselects, i.e.
>working through the example in Embedded SQL Guide. I was wondering could
>I join the 3 queries without using views?
select d.PlannedAssessor,
(select count(*) from DAR d2
inner join ACCIDENTCLAIMPROCESS a on d2.darno=a.darno
where d2.plannedAssessor <> a.assessor AND d2.plannedAssessor =
d.plannedAssessor) AS DidNotMakeAppointMent,
count(distinct darno) as AssesmentCount,
(select count(*)
from DAR d3 inner join ACCIDENTCLAIMPROCESS a2 on d3.darno=a2.darno
where d3.Assessor_DT > a2.ASSESSMENTDATE and
d3.plannedAssessor=d.plannedAssessor) AS UnknownColumnName
FROM DAR d
GROUP BY d.PlannedAssessor
HTH,
Set