Remove duplicate rows based on max value of a different column
I'm attempting to filter some of my data and I'm having problems getting it correct. Through SQL I'm pulling some sales data in to a table. Each sales order has it's own unique number (Sales Order Number) which can have multiple rows of data (a row for each item on the sales order). As sales orders are updated our system will archive off the old version, applying a version number to each row of data, and create a new version number and apply that to each row of data.
I need to be able to extract all rows of a Sales Order Number which match the max value of the Version.
Do you have another way of doing this withing the query editor? I have a set of data that I am trying to remove duplicates based on the number of filled cells per row and I was able to get a number (like the version number) for each of my rows which will give me a max. But, once I get rid of the duplicates I want to be able to append this query with other ones, so I need it de-duped within the query editor.