We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

ROQL COUNT() returns multiple rows?

Received Response
17
Views
5
Comments
edited Mar 18, 2017 9:01PM in Integrations and APIs 5 comments

Content

Hello

select count(distinct Emails.Emaillist.AddressType.ID) as Count from contact 

The result shows multiple rows: 

Count
1
1
1

I am expecting one row with this result: 

Count
3

Please help!

Without the aggregate COUNT the result is good: 

select distinct Emails.Emaillist.AddressType.* from contact 

ID Name LookupName
0 Email - Primary Email - Primary
1 Alternate Email 1 Alternate Email 1
2 Alternate Email 2 Alternate Email 2

 

Thanks

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!