what's wrong with this code?

Поиск
Список
Период
Сортировка
От Jude DaShiell
Тема what's wrong with this code?
Дата
Msg-id alpine.NEB.2.11.1506160818030.18305@panix2.panix.com
обсуждение исходный текст
Ответы Re: what's wrong with this code?
Re: what's wrong with this code?
Список pgsql-novice
cut here.
--- query: phealth.sql
--- by Jude DaShiell & Tim Chase
--- Last Updated: 2014-10-08 12:24
select
min(date) as "starting date:",
max(date) as "ending date:",
count(cystalic_pressure) as "Cystalic sample size:",
  round(avg(cystalic_pressure),1) as "Average Cystalic Pressure:",
min(cystalic_pressure) as "Min Cystalic Pressure:",
max(cystalic_pressure) as "Max cystalic Pressure:",
  pop_stdev(cystalic_pressure) as "population deviation cystalic pressure: ",
  (select cystalic_pressure
   from health
   group by cystalic_pressure
   order by count(cystalic_pressure) desc, cystalic_pressure
   limit 1) as "Mode Cystalic Pressure:",
count(dyastalic_pressure) as "dyastalic sample size:",
round(avg(dyastalic_pressure),1) as "Average Dyastalic Pressure:",
min(dyastalic_pressure) as "Min Dyastalic Pressure:",
Max(dyastalic_pressure) as "Max Dyastalic Pressure:",
  pop_stdev(dyastalic_pressure) as "population deviation dyastalic pressure: ",
  (select dyastalic_pressure
   from health
   group by dyastalic_pressure
   order by count(dyastalic_pressure) desc, dyastalic_pressure
   limit 1) as "Mode Dyastalic Pressure:",
count(pulse) as "Pulse Sample Size:",
round(avg(pulse),1) as "Average Pulse:",
min(pulse) as "Min Pulse:",
max(pulse) as "Max Pulse:",
  pop_stdev(pulse) as "population deviation pulse: ",
  (select pulse
   from health
   group by pulse
   order by count(pulse) desc, pulse
   limit 1) as "Mode Pulse:",
count(blood_sugar) as "Sugar Sample Size:",
  round(avg(blood_sugar),1) as "Average Sugar:",
min(blood_sugar) as "Min Sugar:",
max(blood_sugar) as "Max Sugar:",
  pop_stdev(blood_sugar) as "population deviation blood sugar: ",
  (select blood_sugar
   from health
   group by blood_sugar
   order by count(blood_sugar) desc, blood_sugar
   limit 1) as "Mode Sugar:"
from health;

--



В списке pgsql-novice по дате отправления:

Предыдущее
От: Bianca Stephani
Дата:
Сообщение: Re: Update taking forever
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: what's wrong with this code?