File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,38 +150,59 @@ local Top5 =
150150 + bg.queryOptions.withTransformations([
151151 bg.queryOptions.transformation.withId('groupBy' )
152152 + bg.queryOptions.transformation.withOptions({
153- fields: {
154- Cost: {
155- aggregations: [
156- 'sum' ,
153+ " fields" : {
154+ " Cost" : {
155+ " aggregations" : [
156+ "firstNotNull"
157157 ],
158- operation: ' aggregate' ,
158+ " operation" : " aggregate"
159159 },
160- User: {
161- aggregations: [],
162- operation: 'groupby' ,
160+ "Date" : {
161+ "aggregations" : [
162+ "firstNotNull"
163+ ],
164+ "operation" : "groupby"
163165 },
164- date: {
165- aggregations: [],
166+ "User" : {
167+ "aggregations" : [],
168+ "operation" : "groupby"
166169 },
167- user: {
168- aggregations: [],
169- operation: 'groupby' ,
170+ "date" : {
171+ "aggregations" : []
170172 },
171- value: {
172- aggregations: [
173- 'sum' ,
173+ "user" : {
174+ "aggregations" : [],
175+ "operation" : "groupby"
176+ },
177+ "value" : {
178+ "aggregations" : [
179+ "sum"
174180 ],
175- operation: 'aggregate' ,
181+ "operation" : "aggregate"
182+ }
183+ }
184+ }),
185+ bg.queryOptions.transformation.withId('groupBy' )
186+ + bg.queryOptions.transformation.withOptions({
187+ "fields" : {
188+ "Cost (firstNotNull)" : {
189+ "aggregations" : [
190+ "sum"
191+ ],
192+ "operation" : "aggregate"
176193 },
177- },
194+ "User" : {
195+ "aggregations" : [],
196+ "operation" : "groupby"
197+ }
198+ }
178199 }),
179200 bg.queryOptions.transformation.withId('sortBy' )
180201 + bg.queryOptions.transformation.withOptions({
181202 sort: [
182203 {
183204 desc: true ,
184- field: 'Cost (sum)' ,
205+ field: 'Cost (firstNotNull) ( sum)' ,
185206 },
186207 ],
187208 }),
You can’t perform that action at this time.
0 commit comments