This question runs in a pre-configured Salesforce environment - no personal connection required.

Query the Contact object and return a list of full names for all contacts where the Phone field is null. Format each name as "FirstName LastName". If a contact has no FirstName, use only the LastName. Order the results by LastName, then FirstName. Limit to 200 records.

Examples:

Input: (no parameters - queries org data) Output: ['Alice Lee', 'Bob Johnson', 'Jane Smith'] Explanation: Returns names of all contacts that have no phone number on file, ordered by last name then first name Input: (no contacts without phone in the org) Output: [] Explanation: Returns an empty list when all contacts have a phone number Input: (contact with no FirstName and Phone is null) Output: ['Johnson'] Explanation: When FirstName is null, only LastName is returned
Apex Code Editor

Welcome to Lightning Challenge!

How It Works

  • • Write your solution in the code editor
  • • This challenge runs without connecting your own org
  • • Submit to check if your solution passes
  • • Use hints if you get stuck

Contest Alert

🏆 #CodeEveryDay July 2026

Contest runs July 1 - 31. Complete challenges to climb the leaderboard!

Only the 31 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In