0

As I want to retrieve the LastUpdate , LocReqNo of every location. I mean to say that in the mention table there is 3 locationId , i.e., A1,A2,A3.

enter image description here

I want the output of the above table as follows:

enter image description here

I have gone through How to get latest 2 records of each group , but unable to get my expected result.

Any suggestion or help will be appreciated.

  • what MySQL version? – danblack Nov 19 '18 at 7:34
  • @danblack, MySQL version is 5.7. – Md Haidar Ali Khan Nov 19 '18 at 7:46
  • See the tag I added. – Rick James Nov 20 '18 at 3:09
  • @RickJames, Yes Rick ,I have missed to add that tag. Thanks for notify and it's accepted. – Md Haidar Ali Khan Nov 20 '18 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.