postgresql - How to find minimum values in a column in sql -


if have table this:

id   name   value 1    abc      1 2    def      4 3    ghi      1 4    jkl      2 

how can select new table still has id, name, value ones minimum value.

in example need table back:

1  abc 1 3  ghi 1 

finding values pretty straightforward:

select * yourtable value = (select min(value) yourtable); 

as right syntax putting rows in table, depend on database engine using.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -