Can anyone guide me... [message #378185] |
Mon, 29 December 2008 04:57 |
ajayrajesh
Messages: 8 Registered: August 2008
|
Junior Member |
|
|
Hi,
I have a table containing two columns namely Name and Kilometers, the table is like below:
Name Kilometers
Ram 25
Rahim 56
Robert 105
Krishna 85
Abdul 75
I want the Output like below:::
-----------------------------------------------
| Distance in KMs | No. Of people |
-----------------------------------------------
| below 50 | 1 |
| between 50 and 100 | 3 |
| above 100 | 1 |
-----------------------------------------------
Can anyone guide me how to proceed to get the above output.
|
|
|
Re: Can anyone guide me... [message #378193 is a reply to message #378185] |
Mon, 29 December 2008 05:27 |
|
Michel Cadot
Messages: 68704 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
As this has been asked to you in your previous topics: read OraFAQ Forum Guide.
For instance, "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).
Use SQL*Plus and copy and paste what you already tried.
Hint: Group By Result Merging
Regards
Michel
|
|
|