This question seems silly but i am really stuck! I want to get the Account name and Account Rating for my contacts via Apex code, but instead of Account name and rating, it returns the accountId! I run the code in anonymous Console. Any ideas of what i am doing wrong?
List<sObject> contacts = [select id, name, AccountId, Account.Name, Account.Rating from Contact]; system.debug(contacts);