W
W
Wan-Derer2021-12-27 12:48:12
SQL
Wan-Derer, 2021-12-27 12:48:12

How to fix the request so that only unique field values ​​get into the output?

Hello. There is a request: How to remake it so that the b field in the output is unique, i.e. repeated 1 time? The values ​​of the remaining fields can be any valid (taken from this table).

SELECT a, b, c, d FROM my_table;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slava Rozhnev, 2021-12-27
@Wan-Derer

Select b, min(a) a, min(c) c 
From table
Group by b;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question