BookmarkSubscribeRSS Feed
deleted_user
Not applicable
First of all, Im not really strong in SQL coding, so I try to use Enterprise Guide for everything.

The dataset I'm trying to analyse has four variables: 'quantity', 'transaction id', 'product' and 'store'. I'm asked to find out which products are sold alone, that is with no other products involved in the transaction

As I see it I can disregard the variable quantity, since it doesn't matter whether a transaction consists of 100 or 1, since it is still the same product being sold.I can also disregard 'store' since in this case it's not important where the product is being sold...

So I have filtered out 'transaction id and 'product' and I would like to create a filter, that removes the transactions (transaction id) with more than ONE product included, how can that be done?
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I believe you would want to count selected rows, also group by transaction_id and filter when a given transaction involved more than one (counted row).

Scott Barry
SBBWorks, Inc.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1000 views
  • 0 likes
  • 2 in conversation