March 17, 2023 at 12:16 pm
I have a simplified version of a table for organizing documents here.
What is the most efficient way to select the highest rev value for each id?
Using the above data, the result should be two rows when using MySQL: [1, 3, ...] and [2, 1, ..].
I employ checks within the while loop to identify and replace outdated revisions in the resultset. I got this problem post from here.
Is there a SQL solution that can achieve the same result other than this method?
March 17, 2023 at 1:48 pm
The page that you linked to contains three separate approaches to a very similar problem. If you are having problems with one or more of those approaches, show us what you have tried and we'll help you through it. Right now, it looks like you just want to be spoon-fed the answers.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 19, 2023 at 1:08 am
Agree with Drew.
Yes, show us what you tried. I give some additional info., understand how GROUP BY works and when to use it.
=======================================================================
June 1, 2023 at 11:14 am
This was removed by the editor as SPAM
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply