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

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm press

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

PHP, jAVASCRIPT setting input values, why isn't it working?
Hi:

I am calling this javascript:
<script language="javascript">

Checking if a process is running (problems including psapi.dll i think...)
Ok, so all I'm trying to do is check if a program is running...

I've found out that I nee

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

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