Review Questions - Getting Started with SOQL (2014)

Getting Started with SOQL (2014)

Appendix A. Review Questions

This appendix lists the review questions of all the chapters, which will help us to recap all the chapters.

Chapter 1

The following set of questions has multiple options. Choose the number that corresponds with your answer:

Q1. SOQL stands for …

1. Structure Object Query Language

2. Salesforce Object Query Language

3. Both 1 and 2

4. None of the above

Q2. Using Order By, which of the following options are true (select two)?

1. Arrange in ascending order

2. Arrange in descending order

3. Descending order is the default

4. Order By is not supported

Q3. Custom objects always end with __r.

1. True

2. False

Q4. API names of the fields should be used in SOQL instead of the label of the field.

1. True

2. False

The answers for the preceding review questions are as follows:

Q1 – 2

Q2 – 1 and 2

Q3 – 2

Q4 – 1

Chapter 2

Q1. The Alias notation in SOQL changes the label name of the field.

1. True

2. False

Q2. Select the comparison operators (select two).

1. AND

2. OR

3. >

4. =

Q3. The INCLUDES and EXCLUDES operators are used for filtering…

1. Multiselect picklists

2. Lookup

3. Master-detail

4. Many-to-many

The answers for the preceding review questions are as follows:

Q1 – 2

Q2 – 3 and 4

Q3 – 1

Chapter 3

Q1. Which operators are used to filter the multiselect picklist field in Salesforce.com?

1. INCLUDES

2. EXCLUDES

3. Both

4. None

Q2. It is possible to sort records in both ascending and descending order together in a SOQL query.

1. True

2. False

Q3. FOR VIEW is used to update…

1. LastReferencedDate

2. LastViewedDate

3. LastModifiedDate

4. LastCreatedDate

Q4. FOR REFERENCE is used to update…

1. LastReferencedDate

2. LastViewedDate

3. LastModifiedDate

4. LastCreatedDate

The answers for the preceding review questions are as follows:

Q1 – 3

Q2 – 1

Q3 – 2

Q4 – 1

Chapter 4

Q1. Which method in SOQL returns the number of distinct non-null field values?

1. COUNT_DISTINCT()

2. MIN()

3. MAX()

4. COUNT()

Q2. Which method in SOQL returns the maximum value of a field?

1. COUNT_DISTINCT()

2. MIN()

3. MAX()

4. COUNT()

Q3. Which method in SOQL returns the minimum value of a field?

1. COUNT_DISTINCT()

2. MIN()

3. MAX()

4. COUNT()

Q4. Which method in SOQL returns the total value of a field?

1. SUM()

2. MIN()

3. MAX()

4. COUNT()

Q5. Which method in SOQL returns the total number of records in an object?

1. COUNT()

2. MIN()

3. MAX()

4. COUNT()

The answers for the preceding review questions are as follows:

Q1 – 1

Q2 – 3

Q3 – 2

Q4 – 1

Q5 – 1