Desktop productivity for business analysts and programmers

First Record of Each Group in Query Builder

Frequent Contributor
Posts: 94

First Record of Each Group in Query Builder

I have a table called "test".  It contains all the employment applications received.  The dataset contains numerous rows for each application because each is reviewed by various people.  I wrote a code create a dataset containing data when each application was first reviewed.  Is there a way to do the same in query builder? Thanks!

Super User
Posts: 5,916

First Record of Each Group in Query Builder

Depends on how your source table look like (and how you solved in your program).

But if it can be solved in a single, fairly simple SQL, the chances are, yes, you might can.

If you have an application id, and a timestamp on each row which defines the time when the application was reviewed, you might do something like this:

  1. Define MIN as summary on your timestamp column
  2. Define the application id as Group By column. You'll have to un-check "Automatically Select groups" if you have other columns that you want to keep, other than the id.
  3. Define a Having condition that will filter out rows that has timestamp = min(timestamp):
  • Filter data - Filter Summarized Data - New Filter
  • Basic Filter
  • Select MIN_of_timestamp column from the data columns section
  • Define it as Equal to - Value - Columns - Timestamp

And run...


Data never sleeps
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation