Splunk Search

use subsearch

otman01
Communicator

hi every one,

I want to make a search that could give me the same result of SQL Querie

select id_product from products where price = (
select max price from products )

thank you

0 Karma
1 Solution

woodcock
Esteemed Legend

sourcetype=products | eventstats max(price) AS maxPrice | where price=maxPrice | stats values(id_product)
OR
sourcetype=products | eventstats max(price) AS maxPrice | where price=maxPrice | fields id_product

View solution in original post

0 Karma

woodcock
Esteemed Legend

sourcetype=products | eventstats max(price) AS maxPrice | where price=maxPrice | stats values(id_product)
OR
sourcetype=products | eventstats max(price) AS maxPrice | where price=maxPrice | fields id_product

0 Karma

otman01
Communicator

thank you woodcock
it works perfectly. have a nice day

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...