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

Write a method that uses SOQL to find all Contact records whose email address belongs to a specific domain. The method should take a domain parameter (e.g., 'cloudcodeacademy.com') and return a List of Contact names (FirstName + LastName) sorted alphabetically.

This challenge tests your ability to work with string pattern matching in SOQL using the LIKE operator and handle proper field concatenation.

Examples

Input: domain = 'cloudcodeacademy.com' Output: ['Michael Johnson', 'Nina Petrov', 'Sarah Davis'] Explanation: Returns contacts whose email ends with '@cloudcodeacademy.com', sorted by name Input: domain = 'techflow.com' Output: ['Emily Martinez', 'Grace Kim', 'Robert Chen'] Explanation: Returns contacts whose email ends with '@techflow.com', sorted by name Input: domain = 'nonexistent.com' Output: [] Explanation: Returns empty list when no contacts have emails from that domain
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