Choose Language Hide Translation Bar
Level I

query only superceded data



I have a question about using JMP to select only superceded data from a db.  


This is an example of a query that illustrates my dilemma:


"SELECT Top 3 * FROM (db)
WHERE TrackOutTime> '1/1/2018'");


It works, but t I have many of the same wafer IDs with multiple entries, and I'm intereseted in only getting the most recent entry.  


The example query gives me a table like this:


1/1/2018 10:28472HT0397-28
1/1/2018 10:43473HT0397-28
1/1/2018 10:53475HT0397-28


How do I make my query select only the most recent wafer ID entry?  

Community Manager Community Manager

Re: query only superceded data

Hi @andyjohnmac,

What database are you trying to query?

Different databases use different syntax for the type of query you are trying to perform.


Without all the details I think you might be able to do something like the following--

  1. Aggregate by Count on one of your variables
  2. Switch to the sampling tab and Select Sample this result set
  3. Toggle the First N Rows radio button and set the value to 3.

This will limit or return the first 3 rows.


Select Top N from database using JMP Query BuilderSelect Top N from database using JMP Query Builder


 Or you could always use the custom SQL function.

Go to the red triangle menu and select convert to Custom SQL.

Convert to Custom SQL with JMP Query BuilderConvert to Custom SQL with JMP Query Builder

Level I

Re: query only superceded data

I'm sorry I did not responds sooner.  I tried to understand this reply, but it is too advanced for my current coding skill level and was not able to implement.  I had asked a few people here to help me, and they broke down the code for me.  I still don't necessarily understand, but it seems like it's similar to what you have done, and I appreciate you taking the time to answer my question.   


The graphical interface you displayed is very much different from what I am accustomed to using, and seems much more functional than my neanderthal methods.   If there is some class I can take to get more familiar with that interface I'd be interested in persuing it, but I would not even begin to know where to look, where to start, or what to request in order to get some introductory/novice level exposure.  

Community Manager Community Manager

Re: query only superceded data



Yes there are a variety of resources available for learning how to navigate and use the Query Builder interface.

Here are a few to get you started.

  1. On demand video
  2. Discovery Summit presentation
  3. Online documentation