有下表:
create table operations
(
operation varchar,
date_time timestamp default now(),
id serial
constraint operations_pk
primary key,
value numeric(9,2)
);
operation 是一个可以取值 orig(this is +) 或 stor(this is -(minus)) 的字段。
value - 要计算的实际值 (111.00, 1231231.34)。
date_time - 时间(今天的所有值都应该考虑在内)。
这将如何在请求级别组织?提前致谢)