Your problem is that you are using DISTINCT across all columns of solubility. Because for LOT NO 1700002, you have unique values (ie 'elec break', 'pin hole') in column abnormal content, you keep getting the same rows back because each row is unique on the set of columns.
If I remember correctly, Excel (ie M$) sql has a FIRST or LAST version, SAS (ie JMP) does not (although that might have changed under current versions.
Here's code I wrote that seems to answer your question:
SELECT t2.*
FROM Solubility t2
WHERE t2."Column 1" IN (
SELECT DISTINCT t1."Column 1"
FROM Solubility t1
GROUP BY t1."LOT NO"
HAVING t1."Column 1" = Max(t1."Column 1"));
I opened Solubility into JMP
I added a column, Column 1 (think of this as a Sort/Order column)
Next I went into SQL Query builder under tables
After Picking Solublity as table, I picked "column 1", and "lot no", which I'm going to use in a coorelated sub-query (ie a temporary table), and checked DISTINCT Rows only, and clicked add
Now I clicked the triangle next to query Name and chose Convert to Sql. This will let me write the code (30 years of SAS - click and point only get you so far).
I editted the code to what I gave you above, ran the query, corrected any errors that came up, until it ran right.
Basically I matched your modified solubility on column 1 on the correlated subquery mentioned above. The subquery returns unique "column 1"s by taking the maximum column 1 of each group of "lot no". I'm using Max() here as a subsitute for last. Min() could be used as a substitute for FIRST.
I could have also done this as a JOIN on the subquery as another table. We'll leave that for tomorrow.
I know this is probably pretty esoteric, but if you have any questions let me know, Ill try to answer them.
RCW