• Carry Adams
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I need to run a query but do not must return account id duplicated.

I followed these articles:
  • https://developer.salesforce.com/forums/?id=906F00000008yzrIAA
  • https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_groupby.htm
and this is my query: 
SELECT Id, AccountId FROM Asset GROUP BY AccountId

but this gives an error: 
[MALFORMED_QUERY] Field must be grouped or aggregated: Id

what do I need to change in my query to she works?