When group by is used, how to write or use the where clause in soql ?



When group by is used, how to write or use the where clause in soql ?..

Answer / Awdhesh Kumar Gautam

You can include a WHERE clause when using GROUP BY in SOQL, but it must filter the data before the GROUP BY operation. The WHERE clause should come before the GROUP BY clause. For example: `SELECT Fields, COUNT(Id) FROM Object WHERE Condition GROUP BY Fields`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What were you doing before sfdc development?

0 Answers  


What are the different ajax action tags? What does each do?

1 Answers  


What are the benefits of the “one trigger per object” design pattern?

1 Answers  


How to add a formula field to a salesforce report?

1 Answers  


What is a junction object?

1 Answers  


What is a Workflow Alert?

1 Answers  


What is difference between datatable and pageblock table?

1 Answers  


What is field-level security in salesforce ?

1 Answers  


What is 'SOQL'?

1 Answers  


When should you build solutions declaratively instead of with code?

1 Answers  


What is Profile and Components?

1 Answers  


What are the different ways to Share a record?

1 Answers   Cognizant,


Categories