Help with Oracle SQL Count function! =)
Posted
by user363024
on Stack Overflow
See other posts from Stack Overflow
or by user363024
Published on 2010-06-10T01:32:40Z
Indexed on
2010/06/10
1:42 UTC
Read the original article
Hit count: 246
Hi guys..
The question im struggling with is this:
i have a list of helicopter names in different charters and i need to find out WHICH helicopter has the least amount of charters booked. Once i find that out i need to ONLY display the one that has the least.
I so far have this:
SELECT Helicopter_Name COUNT (Distinct Charter_NUM) FROM Charter_Table GROUP BY Helicopter Name
^ this is where i am stuck, i realise MIN could be used to pick out the value that is the smallest but i am not sure how to integrate this into the command.
Something like Where MIN = MIN Value
Id really appreciate it
© Stack Overflow or respective owner