SELECT * FROM title gives me the following output:
title_number version_type hd_sd
1000046 Standard SD
1000046 Standard HD
1000050 Standard SD
1000093 Standard SD
1000093 Standard HD
1000125 Standard SD
1000269 Standard SD
I need to get all distinct title_numbers and then hd_sd will = HD if that exists, otherwise, it will = SD. The correct output would be:
title_number version_type hd_sd
1000046 Standard HD
1000050 Standard SD
1000093 Standard HD
1000125 Standard SD
1000269 Standard SD
The closest I got to this was SELECT * FROM title GROUP BY title_number, but that does not give me the correct hd_sd column value. How would I correctly do this query?
for improvements,