Skip to main content
Hi

there ,

I need to write soql to sum price of order line items 

Example:-

In below table i need to do sum  of p1,p2,p3,p4 price for all the order line items by their code  based on the date parameter .

Note : Price field is custom field on the product object.

SOQL to do sum of order line item price( price is custom field on product object) by their product level code

Can anyone please send me a sample soql to do sum of product price by the product code.

Thank you

Aruna.
2 answers
  1. Mar 15, 2016, 3:48 PM
    Thank you Mahesh,

    Below soql is  working for me.

    Select Component_Description__r.Family,Component_Description__r.Level_2__c,sum(Component_List_Price__c) totalPrice

                                                        from  Order_Sub_Line_Item__c  where Component_List_Price__c!=null 

                                                        group   by Component_Description__r.Family,Component_Description__r.Level_2__c ]
0/9000