What does select-mysql mean?

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.