-3

I have below table in "ORDCOMPLETE" is duplicate with same order ID #11310, so I need to remove this duplicate id with the same prefix.

    #11309  ORDCOMPLETE7104671693208650         $30
#11310  ORDCOMPLETE4335631693207733         $30
    #11310  ORDCOMPLETE4335631693207744         $30
    #11310  DISCOUNT4335631693207733            $3
   

I need result like below:

    #11309  ORDCOMPLETE7104671693208650         $30
#11310  ORDCOMPLETE4335631693207744         $30
    #11310  DISCOUNT4335631693207733            $3
OMi Shah
  • 5,768
  • 3
  • 25
  • 34
  • 4
    Please provide the whole query that you tried and the database tables structure. – Ketan Harsoda Aug 29 '23 at 08:08
  • Do you want a SQL or Laravel answer? – jarlh Aug 29 '23 at 10:50
  • 1
    Does this answer your question? [How to select records without duplicate on just one field in SQL?](https://stackoverflow.com/questions/12239169/how-to-select-records-without-duplicate-on-just-one-field-in-sql) – He3lixxx Aug 30 '23 at 16:39

0 Answers0