Exam SPLK-1002 All QuestionsBrowse all questions from this exam
Question 62

Which of the following searches would return a report of sales by product_name?

    Correct Answer: B

    To generate a report of sales by product name, the correct search would need to aggregate the sales data and group it by the product_name. The option 'chart sum(price) as sales by product_name' achieves this by using the 'chart' command to sum the price and alias this sum as 'sales', then group the results by 'product_name'. This produces a chart or report that displays the total sales amount for each product name.

Discussion
SartarusOption: B

C is not possible B its correcte

gcalcaterra

Correct, B is the answer. "over" and "by" can be used with chart, only "by" can be used with stats, so C doesn't work. https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/Chart https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/Stats

NouraneOption: B

B is correct

mardaOption: B

B - P50 Also, as stated before "by" or no clause can be used with stats so C is out.

ymbOption: B

C would result in an error

monk85Option: B

only B is correct

jakal12345Option: A

Correct Answer is A. The option B , treats sum(price) as number of sales .... BUT sum(price) of a product is NEVER the amount of sales ? sales means the number of products sold and it'll be a different field altogether.

jakal12345

Though the above interpretation holds true , I realized that the answer will be B , only , as a chart command must make use of a function , and that happens only in the option B. Please correct me If i'm wrong Thanks