2 answers
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 ]