+ 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.