【发布时间】:2009-12-18 18:58:47
【问题描述】:
我有一个表格,其中的数据如下所示:
create table demo_patient_info (
attend timestamp,
patient_id int,
blood_pressure double
);
我想编写(最好是 ANSI)SQL 查询,允许我执行以下操作:
查询1:
返回所有患者的bp之间的差值(使用WHERE子句限制笛卡尔积返回的行数)
查询2:
返回每个患者的 bp 与表中一位特定(即指定)患者的 bp 之间的差异
【问题讨论】:
-
"blood_pressure double" 不是故意的?!
-
呵呵...弗洛伊德的失误...zing!
标签: sql