I have a table whose column reference
contains values constructed as follows:
Reference / Color / Size / Gender
Examples:
JOHN/WHITE/52/MALE
JOHN/WHITE/51/FEMALE
JOHN/BLACK/52/MALE
JOHN/BLACK/51/FEMALE
JANE/BLACK/XL/MALE
JANE/PINK/L/FEMALE
578/WHITE/L/FEMALE
578/BLACK/L/FEMALE
I tried using SUBSTR (English) , but the first portion of the reference is not a fixed length.
Question
How can I select the records by getting only one for each reference found?
Example of the result to be obtained based on the examples above:
JOHN/WHITE/52/MALE
JANE/BLACK/XL/MALE