Accounts Nobody Can Call
Intermediate SolvedThe inside sales team is cleaning up data before a calling blitz and needs the accounts that have no phone number on file.
Return the Name of every Account that has no Phone value.
Sample data
Account 4 records
| Name | Phone |
|---|---|
| Acme Cloud | +91 40 5555 0101 |
| Bluefin Bank | null |
| Corex Labs | +44 20 5555 0199 |
| Delta Retail | null |
Expected result on the sample
| Name |
|---|
| Bluefin Bank |
| Delta Retail |
Row order does not matter. Only the columns above are compared; extra columns in your SELECT are fine.
Hints
- SOQL uses
= null, notIS NULL.
What this tests
SOQL tests for null with = null and != null; there is no IS NULL. Salesforce also stores an empty text value as null, so an account saved with a blank phone is caught by the same filter. Interviewers use this to check that you know SOQL is not SQL.
Datasets
Solved on this device only. Sign in with Google to keep your progress across devices.
Run on sample executes your query against the sample data shown on the left and displays the rows it returns. Submit checks it against the sample plus 2 hidden datasets, comparing your rows with the expected rows on each. Queries run in a real Salesforce org; the data is inserted for your run and rolled back afterwards.