simple sql
How can i have an output like this??
HEM_PATIENT_ID :primary key
OutpuT:
First row: initial number values of the fields
Second row: average values of the fields
select * from (
select HEM_LOKOSIT, HEM_NNS
from LPMS.HEMOGRAMS
where HEM_PATIENT_ID = 33
union
select AVG(HEM_LOKOSIT), AVG(HEM_NNS)
from LPMS.HEMOGRAMS
where HEM_PATIENT_ID = 33)
order by HEM_LOKOSIT desc nulls last;
|