This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, Amount | |
FROM Opportunity | |
ORDER BY Amount DESC | |
LIMIT 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, Amount | |
FROM Opportunity | |
ORDER BY Amount DESC NULLS LAST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Account.Name, FirstName, LastName | |
FROM Contact | |
ORDER BY Account.Name, FirstName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name | |
FROM Account | |
ORDER BY Name ASC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, BillingState | |
FROM Account | |
WHERE BillingState IN ('CA', 'NY', 'FL') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Company, LeadSource | |
FROM Lead | |
WHERE LeadSource = 'Web' | |
AND CreatedDate = THIS_WEEK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, Amount | |
FROM Opportunity | |
WHERE Amount > 50000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name | |
FROM Lead | |
WHERE DAY_ONLY(CreatedDate) = 2019-02-27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name | |
FROM Lead | |
WHERE CreatedDate >= 2019-02-27T00:00:00Z | |
AND CreatedDate < 2019-02-28T00:00:00Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, FirstName, LastName, Email, Phone | |
FROM Contact | |
WHERE NOT ( | |
FirstName LIKE 'B%' OR | |
FirstName LIKE 'C%' | |
) |