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

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

Loop column after 2 results
Hello All.

Here is what I have:

Client ID Company name Clien

PHP Form to Variable.
Hi! I have written a HTML-form code in DreamWeaver CS3 (in a PHP doc) and I really need it to work s

A Few Questions
Hi, I want to ask a few questions that I can't seem to find..

1) I'm creating a "shortcu

square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n

Wierd echo error?
Hi, i got the most wierd php error ever and i don't know why..
Code: echo "<t

Using Microsoft Exchange Server with PHP
Hi,

I wanted to know if its possible to fetch email attachments from the exchange server usin

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

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