Jump to content

need help with MySQL query


A@P

Recommended Posts

Having a hard time coming up with a working query, thought I would seek some help!

 

Here's the situation, say this is my dB:

 

serial_number        date        stage

 

      001            20080909      in

      002            20080909      in

      003            20080911      in

      002            20080910      out

      001            20080910      out

      003            20080912      out

      004            20080915      in

      002            20080911      left

      003            20080916      left

 

I need to find all serial_number that at the most recent date is at stage 'X'. So if X were "out", the only matching result from the above dB would be serial_number "001".

 

Hope I explained it well enough. Any help? Thanks in advance!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.