back soft

مطالب مرتبط با «group by month» در back soft | نویسنده: استخدام کار

Group by month and year of a date column

Vote count: 0 i have my query as following select Max(Reimbursement_EBSUtilization.Id) as Id,ProviderReimbursementRequest.Contractor_Id, Reimbursement_EBSUtilization.ServiceMonth, fContractor.Contractoame,Reimbursement_EBSUtilization.SD_Id, Max(StandardUnits) as StandardUnits, max(Rate) as Rate,sum(Reimbursement_EBSUtilization.UnitsDelivered) as UnitsDelivered , null as ReduceUnits, Cast(1 as BIT) as IsEbs, Reimbursement_EBSUtilization.BHFormName,fExpenseType.ExpenseType, case when Reimbursement_EBSUtilization.BHFormName is null then max(Rate) * sum(Reimbursement_EBSUtilization.UnitsDelivered) * ISNULL(max(Reimbursement_EBSUtilization.StandardUnits),0) else (case when fExpenseType.ExpenseTyp...

ادامه مطلب

MongoDb group sum by month unable to execute aggregate

Vote count: 0 I have an aggregation script which at the last stage results in the following output. I now want to group and sum by account category but it's telling me that I am somehow trying to convert from BSON type EOO to Date - which I caot see in my code anywhere. { "_id" : { "party_uuid" : "phildominickcompany", "coection_uuid" : "5738fc661a21db15b5c45b49", "account_balances_date" : ISODate("2016-06-30T10:00:00.000+0000"), "object_origin_category" : "Bookkeeping", "object_origin" : "Sage One" }, "account_identifier" : "5010", "account_name" : "Cost of sales - materials", "account_category" : "Sales Expense", "account_type" : null, "account_value_type" : "debit", "account_value" : Numb...

ادامه مطلب