Just like in Apex, some of the data types also come with unique filtering capabilities. For numeric fields, we can use comparison operators like less-than <
or greater-than >
and even combine those with equals =
.
To look for all the big money 💲Opportunities, we can look for those with an Amount greater than >
$100,000.
SELECT Name, Amount FROM Opportunity WHERE Amount > 100000
Name | Amount |
---|---|
United Oil Office Portable Generators | 125000 |
Express Logistics Standby Generator | 220000 |
United Oil Refinery Generators | 270000 |
... | ... |
Notably, that would omit any Opportunities that were exactly $100,000. To be inclusive, we'll need to use the "greater than or equal" operator, >=
:
SELECT Name, Amount FROM Opportunity WHERE Amount >= 100000
Name | Amount |
---|---|
United Oil Office Portable Generators | 125000 |
Express Logistics Standby Generator | 220000 |
United Oil Refinery Generators | 270000 |
University of AZ Installations | 100000 |
... | ... |