Skip to content

Instantly share code, notes, and snippets.

View thebrettbarlow's full-sized avatar

Brett Barlow thebrettbarlow

View GitHub Profile
SELECT Id, Name
FROM Lead
WHERE CreatedDate >= 2019-02-27T00:00:00Z
AND CreatedDate < 2019-02-28T00:00:00Z
SELECT Id, Name
FROM Lead
WHERE DAY_ONLY(CreatedDate) = 2019-02-27
SELECT Id, Name, Amount
FROM Opportunity
WHERE Amount > 50000
SELECT Id, Company, LeadSource
FROM Lead
WHERE LeadSource = 'Web'
AND CreatedDate = THIS_WEEK
SELECT Id, Name, BillingState
FROM Account
WHERE BillingState IN ('CA', 'NY', 'FL')
SELECT Id, Name
FROM Account
ORDER BY Name ASC
SELECT Id, Account.Name, FirstName, LastName
FROM Contact
ORDER BY Account.Name, FirstName
SELECT Id, Name, Amount
FROM Opportunity
ORDER BY Amount DESC NULLS LAST
SELECT Id, Name, Amount
FROM Opportunity
ORDER BY Amount DESC
LIMIT 5
SELECT Id, Name, BillingState
FROM Account
WHERE BillingState IN ('CA', 'NY', 'FL')
LIMIT 10