BookmarkSubscribeRSS Feed
jen123
Fluorite | Level 6

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!

1 REPLY 1
LinusH
Tourmaline | Level 20

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...

/Linus

Data never sleeps

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 3179 views
  • 0 likes
  • 2 in conversation