Question: Identify the SPL query and macro for the following requirement. The maximum number of occurences of a field clientip need to be calculated and the

Identify the SPL query and macro for the following requirement.
The maximum number of occurences of a field "clientip" need to be calculated and the first 10 results should be displayed.
These occurences are to be validated in a macro called testing.
If the count exceeds the user input (assume it is 500), display "PASS" else display "FAIL". This is to be stored in field "result"
Display only the fields clienip, result
SPL query *|| top clientip || 'testing (500)|
SPL query *| top clientip | testing(500)| fields + clientip, result
SPL query *| top clientip | testing (500)|| fields + clientip, result
MACRO eval result = if(count > tonumber ($value1$),"PASS", "FAIL")
MACRO eval result = if(count >($value1$),"PASS", "FAIL")
eval result = if(count < tonumber ($value1$),"PASS","FAIL")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!