About this question
I have a custom object. This custom object has a field Cabin_Type__c, which has values of Twin and Luxury. There is another field Deck_Type__c which is just the number of the deck such as 1,2,3,etc.
So here are what a few of my custom objects might look like
obj1={Cabin_Type__c=Twin, Deck_Type__c=1} obj2={Cabin_Type__c=Twin, Deck_Type__c=1} obj3={Cabin_Type__c=Twin, Deck_Type__c=1} obj4={Cabin_Type__c=Luxury, Deck_Type__c=1} obj5={Cabin_Type__c=Luxury, Deck_Type__c=1} obj6={Cabin_Type__c=Twin, Deck_Type__c=2} obj7={Cabin_Type__c=Twin, Deck_Type__c=2}From the above data, I would like to be able to extract through SOQL the count of cabin types by deck. So from the 7 objects above, I would get
Deck 1 Twin (3)
Deck 1 Luxury (2)
Deck 2 Twin (2)
Is there something in SOQL similar to count() in SQL that I could use for this?