Search Results

Search found 1 results on 1 pages for 'ewdef'.

Page 1/1 | 1 

  • Eliminate duplicates in SQL query

    - by ewdef
    i have a table with 6 fields. the columns are ID, new_id price,title,Img,Active. I have datawhich is duplicated for the price column. When I do a select i want to show only distinct rows where new_id is not the same. e.g.- ID New_ID Price Title Img Active 1 1 20.00 PA-1 0X4... 1 2 1 10.00 PA-10 0X4... 1 3 3 20.00 PA-11 0X4... 1 4 4 30.00 PA-5 0X4... 1 5 9 20.00 PA-99A 0X4... 1 6 3 50.00 PA-55 0X4... 1 When the select statement runs, only rows with ID (1,4,9,6) should show. Reason being the new_ID with the higher price should show up. How can i do this?

    Read the article

1