Pete Winter
asked on
SELECT DISTINCT on one column only
How do I select distinct only on one column.
Below is my current code...
My issue is that I need to select all the columns you see in my code. However I only want the "title" column to be DISTINCT.
What do I need to do?
Below is my current code...
$query_rs_media_new_group = "SELECT DISTINCT title, group_id, description, brand, weight, category, id FROM media_new";
My issue is that I need to select all the columns you see in my code. However I only want the "title" column to be DISTINCT.
What do I need to do?
ASKER
See sample data attached.
media-new.csv
You will notice in the data some of the "title" rows are the same. I only want to show the first unique "title". So I should only see 8 of the 30 rows of data in the sample data.
media-new.csv
You will notice in the data some of the "title" rows are the same. I only want to show the first unique "title". So I should only see 8 of the 30 rows of data in the sample data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks
Thanks!