I have table with multiple rows in two columns.
# Column_A # Column B
# 1 # photo01
# 1 # photo02
# 1 # photo03
# 2 # video01
# 2 # video02
# 3 # music01
# 3 # music02
# 3 # music03
So when i'm using SELECT DISTINCT Column_A i have 3 records: 1, 2, 3.
When i'm using SELECT DISTINCT Column_A, Column_B i have all records.
I want not duplicated rows from Column_A with first row from Column_B, 1:1.
SELECT DISTINCT ID_product, (SELECT photos FROM my_table)
FROM my_table
ORDER BY ID_product
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Expected result:
# Column_A # Column B
# 1 # photo01
# 2 # video01
# 3 # music01
How can I do it?