我有一个关于SQL查询的问题。 我需要计算累计运行总的最后5行基于列Y. y列中的值列X值的可能包含是,否或也许 数据的例子是: Date Column X Column Y Yes cum total No cum total Maybe Total
31/8 1000 Y 1200 800 250
30/8 500 N 250 800 250
我有一个分区表,动态分区, 分区字段国籍,出生日期, 当我使用select * from emp_new where nationality='China',我得到以下三个记录, +---------------+--------------+--------------+------------------+----------------------+--------------------+