You need to sign in to do that
Don't have an account?
Jaymin Sutarwala 7
Need help with SOQL query
I am facing issues coming up with a SOQL query. We have a custom object 'Quote History' which has master detail relationship to Quote object. The Quote History object store the field modified timestamp, field old value and field new value for some of the fields on the Quote object.
I want to write SOQL query that can give me the max(field modified timestamp), the most recent update made to the field] as well as the new value for a particular field for each Quote and Proposal number combination.
I want to write SOQL query that can give me the max(field modified timestamp), the most recent update made to the field] as well as the new value for a particular field for each Quote and Proposal number combination.
You can use SOQL something like this.
select id, (select id,lastmodifieddate from QuoteHistory__r order by lastmodifieddate DESC limit 1) from Quote .
Make sure to use appropriate object name and relationship name in query.