I have a table similar to this: for example, it mainly comes from the previous update. each update will add a record. for example, I updated lead-1 today, then, a new lead-1 status project number will be added. The expected transaction date status will be updated. the Project Status lead-12016-6-42016-3-1 Tracking lead-12016-6-52016- 3-2 lead-12016-7-52016-3-3 review lead-22016-3-52016-3-1 Tracking lead-22016-4-92016-3-3- 2. what I want to do during the review is... selectmysqlsql
I have a table similar to this: for example, it mainly comes from the previous update. each update will add a record. for example, I updated lead-1 today, then a new lead-1 status will be added.
Project No. expected transaction date status update date Project status
Lead-1 2016-6-4 2016-3-1 tracking
Lead-1 under negotiation
Lead-1 under review
Lead-2 tracking
Lead-2 under review
What I want to do is, but I want to complete a query. the result only contains the latest data.
Select * fromSSAs B where not exists (select 1 fromSSWhereProject No.= B.Project No.
And B. Project Update Date <Project g Update Date) <p>
The result is displayed successfully.
Project No. expected transaction date status update date Project status
Lead-1 under review
Lead-2 under review
But I don't know how the SQL query statement is implemented. Can someone explain it?