求助.SQL公式运算问题!
例如:SELECT *
FROM (SELECT TOP 5 *
FROM (SELECT TOP 5 OP_pati_in_me.d_input_time,
OP_pati_in_me.d_out_time,
OP_pati_in_me.s_me_name,
OP_pati_in_me.s_me_type,
OP_pati_in_me.n_me_price,
OP_pati_in_me.n_me_number,
OP_pati_in_me.s_dose_unit,
OP_pati_in_me.s_me_unit,
OP_pati_in_me.s_ctor_input,
OP_pati_in_me.s_ance_mark,
OP_pati_in_me.s_charge_mark,
OP_pati_in_me.s_dell_mark,
OP_pati_in_me.s_yb_update,
OP_pati_in_me.s_reckon_mark,
OP_pati_man.s_office_now
FROM OP_pati_in_me, HIS_pati_account,
OP_pati_man
WHERE OP_pati_in_me.d_out_time >= '2011-12-20' AND
OP_pati_in_me.d_out_time <= '2011-12-23' AND
OP_pati_in_me.s_me_name = '洛希' AND
OP_pati_man.s_ctor_residency = '陈忠' AND
(OP_pati_in_me.s_ic_no = OP_pati_account.s_ic_no) AND
(OP_pati_man.s_hotl_no = OP_pati_in_me.s_hotl_no)
AND (OP_pati_in_me.s_ic_no = OP_pati_man.s_ic_no)
ORDER BY OP_pati_in_me.d_input_time ASC) AS table_1
ORDER BY d_input_time DESC) table_2
ORDER BY d_input_time
得出结果A1 B1 C1 D1 E1 F1
我要得到所有A1数量相加的和.这个公式怎么写?