max function question


Posted on 16th Feb 2014 07:03 pm by admin

Hi All
Ihave a table that holds shipment numbers and dates like this

select * from ship_tab;
ship_num date_ship
1 09-SEP-09
2 17-SEP-09
3 25-SEP-09

i want to fetch the highest ship_num and its date.
right now if i'm doing
select max(ship_num),date_ship from ship_tab
group by date_ship;
it give me :
ship_num date_ship
1 09-SEP-09
2 17-SEP-09
3 25-SEP-09
i want a query to give me
ship_num date_ship
3 25-SEP-09
without doing two fetches is it possible?
thanks

No comments posted yet

Your Answer:

Login to answer
140 Like 53 Dislike
Previous forums Next forums
Other forums

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem: I have below button declaration in markup of the aspx page:

Passing vars to the DB
I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TY

array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_ma

ScriptResource.axd gives an error on fresh install of ASP.NET Ajax 1.0
Hello,I have a fresh install of Microsoft ASP.NET Ajax 1.0. When I create an Ajax enabled website in

Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I

Request for tunning the below query
Hi,

Can any one help me on the below query while improving the performance,

How to refresh a parent page from a modal popup
Hi,I have a modal popup in which I need to upload a file and store in the database should give a mes

Can't shake the "Warning: include()" error
I've just uploaded my site to a new server and where I have PHP include tags in my HTML, the browser

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash