are u sql master?

Started on the old forum in October 2011 · view the original in the archive · old links redirect here

3 replies · 439 views · started 15 years ago · 1 min read

2 participants
amore Junior · 31 posts #1

hi do know answer for this question.. i want to select minimum unique(single) value from a db table. i know hot to select minimum value but i dont know how to select minimum + single value.. here we see this example

table name - salary

name | amount jhon 1000 sam 3000 peter 1000 smith 6000 alex 2000 sara 5000 there r two minimum values (jhon and peter). but i want to select minimum unique (single) value . so result should be alex. coz minimum value is uncommon (single)

something else Fellow · 2,296 posts #2
SELECT MIN(amount) FROM salary GROUP BY amount HAVING(COUNT(amount)<2)
amore Junior · 31 posts #3

thanks mate .. thats what i need.

something else Fellow · 2,296 posts #4

pity you deleted your question as it could have helped someone else @ amore topic might aswell be deleted now 🙁

TY arnage for bring this topic back im sure it will help someone else 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close