Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get first record of each item only ?

Re: How to get first record of each item only ?

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 21 Apr 2005 10:50:59 -0700
Message-ID: <1114105859.444640.168650@z14g2000cwz.googlegroups.com>

SELECT itemid, MIN(qty) from table;

Before you complain "that doesn't work!" , Please define which one is the "first item"

This is a Relational Database we are discussing. There is no ORDER to the rows in a table.

 There may be order in the result set only when you apply one (SELECT ... ORDER BY ...). Received on Thu Apr 21 2005 - 12:50:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US