SOQL to be outside of for loop
24009
How do I bulkify queries for directly or indirectly related records?
43481
Returning query results in predefined order
69613
How do I add a condition to a query?
58708
Elegant way to convert Set into String for Dynamic SOQL IN comparison
39195
Variable scope - database.query() has access to variables not in scope
42613
Workaround for Offset 2000 limit on SOQL Query
60497
System.QueryException: List has more than 1 row for assignment to SObject
53226
Using single quote by curly braces in String.format in Dynamic SOQL
114337
How to check that SObject field is present in SOQL query
105246
Inline query has too many rows for direct assignment, use FOR loop
62898
QUERY error for BY column
72701
How to emulate SOQL LIKE matching in Apex?
61961
How to make LINQ execute a (SQL) LIKE range search
21145
Return more than 2000 records (SOQL)
121856
The result of a query cannot be enumerated more than once
155018
Use of Distinct with list of custom objects
90812
Filtering by Long Text Area field in SOQL