function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yogesh BiyaniYogesh Biyani 

Query to show account name for the following query

I am using the following query to show accountids . How do I modify it to show account name instead? 

SELECT  accountid, Count(id) FROM Contact WHERE Email=null GROUP BY accountid LIMIT 1000
Best Answer chosen by Yogesh Biyani
bob_buzzardbob_buzzard
Use the '.' notation to follow the relationship from Contact to Account:
 
SELECT  account.name, Count(id) FROM Contact WHERE Email=null GROUP BY account.name LIMIT 1000

 

All Answers

bob_buzzardbob_buzzard
Use the '.' notation to follow the relationship from Contact to Account:
 
SELECT  account.name, Count(id) FROM Contact WHERE Email=null GROUP BY account.name LIMIT 1000

 
This was selected as the best answer
Yogesh BiyaniYogesh Biyani
Thank you.