I have a table in the database, with columns id
, assunto
, mensagem
, id_replicante
I want to select all the records in this table.
However, in the field assunto
it has several values that repeat, and I would like my selection to take only 1 of those that repeat.
Example:
In the table:
(1, assunto1, mensagem1, 2)
(2, assunto1, mensagem2, 3)
(3, assunto2, mensagem3, 4)
(4, assunto3, mendagem4, 4)
SELECT * FROM tabela WHERE...
I would like it to look like this:
subject1, subject2, subject3,