我要查询的合并试算表余额有两个不同的期间,一个作为期初余额,另一个作为当前期间。
我有一个名为JDT1的表,如下所示:
我想用与期初余额和经常余额有关的两个不同条件来获得借方和贷方的帐户和总和。我的查询是
Select Account, ProfitCode, FormatCode, Acctname, (Select sum(Debit) as
OBDebit From JDT1 Where RefDate < {?From}), (Select sum(Credit) as
OBCredit From JDT1 Where RefDate < {?From}), (Select sum(Debit) as OBDebit
From JDT1 Where RefDate >= {?From} and Refdate <= {?To}),
(Select sum(Credit) as OBCredit From JDT1 Where RefDate >= {?From}
and Refdate <= {?To}) From JDT1 Full outer join [OACT] on [JDT1].[Account]
= [OACT].[AcctCode] Full outer join [OPRC] on [JDT1].[ProfitCode] =
[OPRC].[PrcCode] Group by Account, ProfitCode
但是不幸的是,总和由于不受影响而变成一个组一样的数量。
答案 0 :(得分:0)
您遇到了一些问题。
from pyspark.ml.linalg import Vectors from pyspark.ml.classification import MultilayerPerceptronClassifier, MultilayerPerceptronClassificationModel from pyspark.sql import Row