mysql - List ocurrences in column - SQL -


i have table column has integers, example:

2 2 1 2 3 1 3 

how values occur in column? in case results should be:

1 2 3 

i know there's postgre called width_bucket couldn't make work me , i'm not sure if supposed solve problem.

thank in advance.

based upon question, simple select distinct , order by

select distinct(column_name) table_name order column_name desc 

or

select distinct(column_name) table_name order column_name 

depending on sort order want


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -