Query to compare the latest number by transaction time
Hi team,
I have two entries for a reference number . i need to compare if the display order is correct based on the transaction time,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>
<ac:getConsumerProfileTransactionHistoryResponse xmlns:ac="http://www.moneygram.com/AgentConnect1705">
<ac:payload>
<ac:doCheckIn>true</ac:doCheckIn>
<ac:timeStamp>2018-07-18T16:37:24.679-05:00</ac:timeStamp>
<ac:flags>18</ac:flags>
<ac:mgiSessionID>443077301E15319498444757393417</ac:mgiSessionID>
<ac:GAFVersionNumber>1.1.20180612</ac:GAFVersionNumber>
<ac:numberOfRowsFound>1</ac:numberOfRowsFound>
<ac:transactions>
<ac:transaction>
<ac:currentValues>
<ac:currentValue>
<ac:infoKey>sender_FirstName</ac:infoKey>
<ac:value>ASCFV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sender_LastName</ac:infoKey>
<ac:value>CVVV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiver_FirstName</ac:infoKey>
<ac:value>SDCV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiver_LastName</ac:infoKey>
<ac:value>TESGBVBV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sendAmount</ac:infoKey>
<ac:value>12</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sendCurrency</ac:infoKey>
<ac:value>USD</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiveCurrency</ac:infoKey>
<ac:value>EUR</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receive_Country</ac:infoKey>
<ac:value>CYP</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>deliveryOption</ac:infoKey>
<ac:value>0</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>referenceNumber</ac:infoKey>
<ac:value>26191807</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>productId</ac:infoKey>
<ac:value>1</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>transaction_Event_SequenceNumber</ac:infoKey>
<ac:value>1</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>transactionStatus</ac:infoKey>
<ac:value>SEN</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>transactionStatusUpdateDate</ac:infoKey>
<ac:value>2018-07-18T14:19:30-05:00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>send_Date</ac:infoKey>
<ac:value>2018-07-18T14:19:30-05:00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sender_PrimaryPhone</ac:infoKey>
<ac:value>15224747193</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiveAmount</ac:infoKey>
<ac:value>9.98</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>poeTranId</ac:infoKey>
<ac:value>2496480377</ac:value>
</ac:currentValue>
</ac:currentValues>
</ac:transaction>
<ac:transaction>
<ac:currentValues>
<ac:currentValue>
<ac:infoKey>sender_FirstName</ac:infoKey>
<ac:value>ASCFV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sender_LastName</ac:infoKey>
<ac:value>CVVV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiver_FirstName</ac:infoKey>
<ac:value>SDCV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiver_LastName</ac:infoKey>
<ac:value>TESGBVBV</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sendAmount</ac:infoKey>
<ac:value>12</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sendCurrency</ac:infoKey>
<ac:value>USD</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiveCurrency</ac:infoKey>
<ac:value>EUR</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receive_Country</ac:infoKey>
<ac:value>CYP</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>deliveryOption</ac:infoKey>
<ac:value>0</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>referenceNumber</ac:infoKey>
<ac:value>98038080</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>productId</ac:infoKey>
<ac:value>1</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>transaction_Event_SequenceNumber</ac:infoKey>
<ac:value>1</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>transactionStatus</ac:infoKey>
<ac:value>SEN</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>transactionStatusUpdateDate</ac:infoKey>
<ac:value>2018-07-18T14:19:02-05:00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>send_Date</ac:infoKey>
<ac:value>2018-07-18T14:19:02-05:00</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>sender_PrimaryPhone</ac:infoKey>
<ac:value>15224747193</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>receiveAmount</ac:infoKey>
<ac:value>9.98</ac:value>
</ac:currentValue>
<ac:currentValue>
<ac:infoKey>poeTranId</ac:infoKey>
<ac:value>2496480376</ac:value>
</ac:currentValue>
</ac:currentValues>
</ac:transaction>
</ac:transactions>
<ac:infos>
<ac:info xsi:type="ac:CategoryInfo">
<ac:infoKey>profileTransactionHistoryInfoSet</ac:infoKey>
<ac:label>Consumer Profile Transaction History</ac:label>
<ac:labelStandAlone>Consumer Profile Transaction History</ac:labelStandAlone>
<ac:displayOrder>1</ac:displayOrder>
<ac:infos>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>sendAmount</ac:infoKey>
<ac:label>Send Amount</ac:label>
<ac:labelStandAlone>Send Amount</ac:labelStandAlone>
<ac:displayOrder>15</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>decimal</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>sendCurrency</ac:infoKey>
<ac:label>Send Currency</ac:label>
<ac:labelStandAlone>Send Currency</ac:labelStandAlone>
<ac:displayOrder>16</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>direction1</ac:infoKey>
<ac:label>Home Delivery Direction 1</ac:label>
<ac:labelStandAlone>Home Delivery Direction 1</ac:labelStandAlone>
<ac:displayOrder>17</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>direction2</ac:infoKey>
<ac:label>Home Delivery Direction 2</ac:label>
<ac:labelStandAlone>Home Delivery Direction 2</ac:labelStandAlone>
<ac:displayOrder>18</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>direction3</ac:infoKey>
<ac:label>Home Delivery Direction 3</ac:label>
<ac:labelStandAlone>Home Delivery Direction 3</ac:labelStandAlone>
<ac:displayOrder>19</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>customerReceiveNumber</ac:infoKey>
<ac:label>Receiver Registration Number (RRN)</ac:label>
<ac:labelStandAlone>Receiver Registration Number (RRN)</ac:labelStandAlone>
<ac:displayOrder>22</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>displayAccountID</ac:infoKey>
<ac:label>Account ID</ac:label>
<ac:labelStandAlone>displayAccountID</ac:labelStandAlone>
<ac:displayOrder>23</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>receiveAgentID</ac:infoKey>
<ac:label>Receive Agent ID</ac:label>
<ac:labelStandAlone>Receive Agent ID</ac:labelStandAlone>
<ac:displayOrder>24</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>receiveCurrency</ac:infoKey>
<ac:label>Receive Currency</ac:label>
<ac:labelStandAlone>Receive Currency</ac:labelStandAlone>
<ac:displayOrder>27</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>receiveCode</ac:infoKey>
<ac:label>Biller Receive Code</ac:label>
<ac:labelStandAlone>Biller Receive Code</ac:labelStandAlone>
<ac:displayOrder>29</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>productVariant</ac:infoKey>
<ac:label>Product Variant</ac:label>
<ac:labelStandAlone>Product Variant</ac:labelStandAlone>
<ac:displayOrder>30</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>accountNickName</ac:infoKey>
<ac:label>Account Nick Name</ac:label>
<ac:labelStandAlone>Account Nick Name</ac:labelStandAlone>
<ac:displayOrder>43</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>receiveAmount</ac:infoKey>
<ac:label>Receive Amount</ac:label>
<ac:labelStandAlone>Receive Amount</ac:labelStandAlone>
<ac:displayOrder>46</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>decimal</ac:dataType>
</ac:info>
<ac:info xsi:type="ac:FieldInfo">
<ac:infoKey>transactionStatus</ac:infoKey>
<ac:label>Transaction Status</ac:label>
<ac:labelStandAlone>Transaction Status</ac:labelStandAlone>
<ac:displayOrder>56</ac:displayOrder>
<ac:display>true</ac:display>
<ac:dataType>string</ac:dataType>
</ac:info>
</ac:infos>
</ac:info>
</ac:infos>
</ac:payload>
</ac:getConsumerProfileTransactionHistoryResponse>
</soapenv:Body>
</soapenv:Envelope>