BookmarkSubscribeRSS Feed
sss
Fluorite | Level 6 sss
Fluorite | Level 6

Hi All,

I am struck up in interesting scenario. I have dataset which has three variable query,brand and datetime variable.

In query variable, the use has maid a search using some brand. he can make same search query using other brand as well. ( the  "AIM express" search in attached fie).

there are few condition are the select the records.

1. the search should be maid in more the one brand .

2. the search should be maid with in 10 mins of first search.

3. group is on query variable.

4. same query can be maid using different brands, i need only those query which are maid in more then one brand and time diff of max 10 mins.

PFA

it would be great help for the solution.

2 REPLIES 2
ballardw
Super User

Questions:

     What environment are you working in? Enterprise Guide, BI, DI, something else?

1. the search should be made in more the one brand .

     Within all brands or just a subset of brand?

2. the search should be made with in 10 mins of first search.

     "First search"? Do you mean to keep track of when a user entered a query and then use that as a comparison time?

3. group is on query variable.

     If this is an SQL query then the syntax is: group by query

4. same query can be made using different brands, i need only those query which are made in more then one brand and time diff of max 10 mins.

     I think you need to provide an example of what have for input here. It looks like you are again trying to keep track of the time that a query was submitted.

sss
Fluorite | Level 6 sss
Fluorite | Level 6

Hi Thank you for connecting.

I am working on BASE SAS.

Ans 1. Within all brands

And 2. yes. your thought is correct.

Ans 3. Yes . the grouping is done on Query variable

Ands 4. here is an example same query is searched on AOL bing and Google the first quiry was done at 14:10:59 and last query was done at 14:23:56 .  so want to select 3 records. If query was done on any of this one brand then that record is to be drop and if query is done on more then one brand and time diff is more then 10 mins the we need to compare rest of obs and produce the out put

it will be OK is diff in time is 15 mins. its just a research.

AIM EXPRESSAOL19MAR14:22:37:49
AIM EXPRESSAOL14JUN14:23:56:49
AIM EXPRESSBING04APR14:15:35:55
AIM EXPRESSGOOGLE11MAR14:10:59:57
AIM EXPRESSGOOGLE05JUN14:20:54:36

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 916 views
  • 1 like
  • 2 in conversation