SQL = "TRANSFORM FIRST(a.TimeStamp1) "
SQL = SQL & "SELECT a.DealName, DealList.SettlementDate "
SQL = SQL & "FROM DealList, DealStepLog a INNER JOIN DealStepMasterData b on b.StepName = a.DealStep "
SQL = SQL & "WHERE b.StepClassification = 'Compliance' "
SQL = SQL & "GROUP BY DealName "
SQL = SQL & "PIVOT dealStep "
我知道我必须在GROUP BY部分放置'SettlementDate',但我不想按settlementDate,任何其他选项进行分组?
答案 0 :(得分:1)
然后你必须使用其中一个聚合函数,例如其中一个:
First(SettlementDate)
Last(SettlementDate)
Max(SettlementDate)
Avg(SettlementDate)
Min(SettlementDate)