<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: get only latest record for each specific column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/620886#M215826</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;Maybe a little late for the main post, but for the others who launch here.&lt;BR /&gt;The best solution is to use the timestamp for sorting :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# only if your _time is not native and format is not timestamp unix or in ISO date (YYYY-mm-dd HH:MM:SS)
|eval time=strptime(_time,"my_format_date") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and dedup the event with the column to be unique. For the exemple :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;|dedup appId sortby -_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have the latest event/row for the appId&lt;BR /&gt;If you want to deduplicate with the "&lt;STRONG&gt;name&lt;/STRONG&gt;" in addition, do this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;|dedup appId name sortby -_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For more documentation :&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 12:26:05 GMT</pubDate>
    <dc:creator>Tartif</dc:creator>
    <dc:date>2022-11-15T12:26:05Z</dc:date>
    <item>
      <title>How to get only latest record for each specific column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523614#M147689</link>
      <description>&lt;P&gt;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="547"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="159"&gt;&lt;STRONG&gt;_time&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="47"&gt;&lt;STRONG&gt;source&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="156"&gt;&lt;STRONG&gt;name&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="76"&gt;&lt;STRONG&gt;appId&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="109"&gt;&lt;STRONG&gt;state&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:27.090 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;Transform-x-2020-10-08&lt;/TD&gt;
&lt;TD&gt;1001&lt;/TD&gt;
&lt;TD&gt;success&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:16.890 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;Transform-x-2020-10-08&lt;/TD&gt;
&lt;TD&gt;1001&lt;/TD&gt;
&lt;TD&gt;running&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:06.490 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;Transform-x-2020-10-08&lt;/TD&gt;
&lt;TD&gt;1001&lt;/TD&gt;
&lt;TD&gt;started&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:27.090 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;copy-y-2020-10-08&lt;/TD&gt;
&lt;TD&gt;203&lt;/TD&gt;
&lt;TD&gt;success&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:16.890 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;copy-y-2020-10-08&lt;/TD&gt;
&lt;TD&gt;203&lt;/TD&gt;
&lt;TD&gt;running&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:06.490 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;copy-y-2020-10-08&lt;/TD&gt;
&lt;TD&gt;203&lt;/TD&gt;
&lt;TD&gt;started&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there are 3 rows with same name(Transform-x-),appId (1001) and other 3 rows with same name(copy-y-) appId(203) , need to fetch the latest for each appId&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;expected output:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="547"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="159"&gt;&lt;STRONG&gt;_time&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="47"&gt;&lt;STRONG&gt;source&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="156"&gt;&lt;STRONG&gt;name&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="76"&gt;&lt;STRONG&gt;appId&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="109"&gt;&lt;STRONG&gt;state&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:27.090 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;Transform-x-2020-10-08&lt;/TD&gt;
&lt;TD&gt;1001&lt;/TD&gt;
&lt;TD&gt;success&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;10/8/20&lt;BR /&gt;7:53:27.090 AM&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;TD&gt;copy-y-2020-10-08&lt;/TD&gt;
&lt;TD&gt;203&lt;/TD&gt;
&lt;TD&gt;success&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;can someone please help with as im new to splunk&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 13:52:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523614#M147689</guid>
      <dc:creator>shivaguthi</dc:creator>
      <dc:date>2022-11-15T13:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523616#M147690</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227298"&gt;@shivaguthi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| stats latest(_time) AS _time values(source) AS source values(name) AS name last(state) AS state BY appId
| eval _time=strftime(_time,"%m/%d/%y %H:%M:%S.%3N")
| table _time source name appId state&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 08:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523616#M147690</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-08T08:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523623#M147692</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thanks for the reply.&lt;BR /&gt;I'm getting one record per appId but I'm not getting the record with latest timestamp&lt;/P&gt;&lt;P&gt;I'm trying to fetch one record per appId which has the latest timestamp&lt;BR /&gt;please suggest on this&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 08:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523623#M147692</guid>
      <dc:creator>shivaguthi</dc:creator>
      <dc:date>2020-10-08T08:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523625#M147693</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227298"&gt;@shivaguthi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry but I don't understand:&amp;nbsp;with my search you take the latest _time and the last state for each appId, isn't correct?&lt;/P&gt;&lt;P&gt;What's the results your have with my search?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 08:55:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523625#M147693</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-08T08:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523629#M147694</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shivaguthi_0-1602147708424.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11200i05708DE54D8B8C24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shivaguthi_0-1602147708424.png" alt="shivaguthi_0-1602147708424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;take a look at the yellow highlighted row it's&amp;nbsp; state is "&lt;STRONG&gt;starting&lt;/STRONG&gt;", i see the latest timestamp. Actually state should be "&lt;STRONG&gt;success&lt;/STRONG&gt;" in the above result&lt;BR /&gt;but I wonder if I look at that event it's&amp;nbsp; state is "&lt;STRONG&gt;success&lt;/STRONG&gt;" as shown below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shivaguthi_1-1602147932241.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11201i517AC5B91C4215C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shivaguthi_1-1602147932241.png" alt="shivaguthi_1-1602147932241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 09:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523629#M147694</guid>
      <dc:creator>shivaguthi</dc:creator>
      <dc:date>2020-10-08T09:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523649#M147702</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227298"&gt;@shivaguthi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;only one question:&lt;/P&gt;&lt;P&gt;in the screenshot is appId application_xxxxxxxx_000x?&lt;/P&gt;&lt;P&gt;could you share a sample with the same appId?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 10:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523649#M147702</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-08T10:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523667#M147711</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;below is the sample data,&amp;nbsp; same appId but&lt;BR /&gt;&lt;BR /&gt;different time stamp, state(success, running,running)&lt;BR /&gt;&lt;BR /&gt;below reocrd has latest time stamp which has state as success - this is expected to come in search&lt;BR /&gt;&lt;BR /&gt;what actually coming already in above&lt;BR /&gt;&lt;BR /&gt;10/8/20&lt;BR /&gt;9:22:57.860 AM&lt;BR /&gt;INFO: got response from the livy LivyResponse [id=1, appId=application_1602141094791_0003, state=success, status=null, name=Copy-x-2020-10-08,&lt;BR /&gt;appId = application_1602141094791_0003log = [state = success&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;10/8/20&lt;BR /&gt;9:22:47.560 AM&lt;BR /&gt;INFO: got response from the livy LivyResponse [id=1, appId=application_1602141094791_0003, state=running, status=null, name=Copy-x-2020-10-08,&lt;BR /&gt;appId = application_1602141094791_0003log = [state = running&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;10/8/20&lt;BR /&gt;9:22:37.220 AM&lt;BR /&gt;INFO: got response from the livy LivyResponse [id=1, appId=application_1602141094791_0003, state=running, status=null, name=Copy-x-2020-10-08, appId = application_1602141094791_0003log = [state = running&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 11:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523667#M147711</guid>
      <dc:creator>shivaguthi</dc:creator>
      <dc:date>2020-10-08T11:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523671#M147712</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227298"&gt;@shivaguthi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: the problem is that the order of the events isn't a time order, but, (in you example), this event&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;10/8/20
9:22:37.220 AM
INFO: got response from the livy LivyResponse [id=1, appId=application_1602141094791_0003, state=running, status=null, name=Copy-x-2020-10-08, appId = application_1602141094791_0003log = [state = running&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;could be the last in order of arriving but not the latest in time,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this is you problem, you could run something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| eval my_state=_time."|".state
| stats latest(_time) AS _time values(source) AS source values(name) AS name max(my_state) AS my_state BY appId
| eval _time=strftime(_time,"%m/%d/%y %H:%M:%S.%3N")
| rex field=my_state "[^\|]+(?&amp;lt;state&amp;gt;.*)"
| table _time source name appId state&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 11:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523671#M147712</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-08T11:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523673#M147714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This looks good.&lt;BR /&gt;could you pls explain this search query&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 11:53:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523673#M147714</guid>
      <dc:creator>shivaguthi</dc:creator>
      <dc:date>2020-10-08T11:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523674#M147715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227298"&gt;@shivaguthi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in stats command it's easy to identify the latest _time using the function "latest", but the problem is that I don't know how to find the relative state.&lt;/P&gt;&lt;P&gt;To do this I created a temp field merging _time and state, to be sure to have the latest,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval my_state=_time."|".state&lt;/LI-CODE&gt;&lt;P&gt;then I use this new field in stats taking the max (_time in the first part assures this condition):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats latest(_time) AS _time values(source) AS source values(name) AS name max(my_state) AS my_state BY appId&lt;/LI-CODE&gt;&lt;P&gt;then I extract only the second part of this temp file containing state using a regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=my_state "[^\|]+(?&amp;lt;state&amp;gt;.*)"&lt;/LI-CODE&gt;&lt;P&gt;So I have all the values I want.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: if this answer solves your need, please, accept it for the other people of Community and Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 12:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/523674#M147715</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-08T12:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: get only latest record for each specific column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/620886#M215826</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;Maybe a little late for the main post, but for the others who launch here.&lt;BR /&gt;The best solution is to use the timestamp for sorting :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# only if your _time is not native and format is not timestamp unix or in ISO date (YYYY-mm-dd HH:MM:SS)
|eval time=strptime(_time,"my_format_date") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and dedup the event with the column to be unique. For the exemple :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;|dedup appId sortby -_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have the latest event/row for the appId&lt;BR /&gt;If you want to deduplicate with the "&lt;STRONG&gt;name&lt;/STRONG&gt;" in addition, do this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;|dedup appId name sortby -_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For more documentation :&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 12:26:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-only-latest-record-for-each-specific-column/m-p/620886#M215826</guid>
      <dc:creator>Tartif</dc:creator>
      <dc:date>2022-11-15T12:26:05Z</dc:date>
    </item>
  </channel>
</rss>

