Hi lars, Use group by clause like as below example: Select people_group_id,count(*) from vatthelp where (your clause) group by people_group_id. Shambo. On 9 Mar 2015 22:06, <lars.j.petters...@vattenfall.com> wrote:
> ** > > Hi group, I have this sql, working fine: > > > > SELECT distinct (PeopleGroup_Form_Entry_ID) from > VATT_HelpTool___Join___AssetPe where AssetLifecycleStatus = 3 and > Data_Set_Id = 'BMC.ASSET' and PeopleGroup_Form_Entry_ID like 'SGP%' > > > > Now I would like to include *number of entries* for each unique match. > > > > Like this: > > > > SGP0000000216, 164 > > SGP0000000512, 12 > > > > How can that be arranged? > > > > Thanks in advance > > > > Lars, Vattenfall, Sweden > > > _ARSlist: "Where the Answers Are" and have been for 20 years_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years"