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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Help - Query

Re: Help - Query

From: Chuck Hamilton <chuck_hamilton_at_yahoo.com>
Date: Fri, 16 Jun 2000 12:22:44 -0700 (PDT)
Message-Id: <10530.109604@fatcity.com>


--0-846930886-961183364=:16324
Content-Type: text/plain; charset=us-ascii

select contractor_number, synthetic_code, max(issue_number)

   from contractor_rates
   group by contractor_number, synthetic_code  

Mahip Narayan wrote:

Hi Lists,
I have a table CONTRACTOR_RATES like this - Primay key is - (CONTRACTOR_NUMBER,SYNTHETIC_CODE,ISSUE_NUMBER)

Name Null? Type

------------------------------- -------- ----
CONTRACTOR_NUMBER NOT NULL VARCHAR2(8)
SYNTHETIC_CODE NOT NULL VARCHAR2(4)
ISSUE_NUMBER NOT NULL NUMBER(6)
BT_RATE NUMBER(7,2)
BASIC_RATE NUMBER(7,2)
STORES_RATE NUMBER(7,2) The objective is Given a particular contractor_number List the maximum issue_number and relevant details(bt_rate,....) synthetic_code wise. Can anybody pl. give the query.

Contractor_number synthetic_code Issue_number 11 1 5
12 1 10
11 2 3
11 3 1
11 1 6
11 2 8

Output if we input Contractor_number = 11 should be - 11 1 6 with other three fields
values
11 2 8 with other three fields
values
11 3 1 with other three fields
values

TIA,
Mahip Narayan

-- 
Author: Mahip Narayan
INET: Mahip_at_mahindrabt.com

Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). 




---------------------------------
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
--0-846930886-961183364=:16324
Content-Type: text/html; charset=us-ascii


<P>select contractor_number, synthetic_code, max(issue_number) <BR>&nbsp;&nbsp; from contractor_rates<BR>&nbsp; group by contractor_number, synthetic_code</P>
<P> <BR><B><I>Mahip Narayan <MAHIP_at_MAHINDRABT.COM></I></B>wrote: <BR>
<BLOCKQUOTE style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px"><BR><FONT face="Courier New">Hi Lists,<BR>I have a table CONTRACTOR_RATES like this -<BR>Primay key is - (CONTRACTOR_NUMBER,SYNTHETIC_CODE,ISSUE_NUMBER)<BR><BR>Name Null? Type<BR>------------------------------- -------- ----<BR>CONTRACTOR_NUMBER NOT NULL VARCHAR2(8)<BR>SYNTHETIC_CODE NOT NULL VARCHAR2(4)<BR>ISSUE_NUMBER NOT NULL NUMBER(6)<BR>BT_RATE NUMBER(7,2)<BR>BASIC_RATE NUMBER(7,2)<BR>STORES_RATE NUMBER(7,2)<BR><BR>The objective is Given a particular contractor_number<BR>List the maximum issue_number and relevant details(bt_rate,....)<BR>synthetic_code wise. Can anybody pl. give the query.<BR><BR>Contractor_number synthetic_code Issue_number<BR>11 1 5<BR>12 1 10<BR>11 2 3<BR>11 3 1<BR>11 1 6<BR>11 2 8<BR><BR>Output if we input Contractor_number = 11 should be -<BR>11 1 6 with other three fields<BR>values<BR>11 2 8 with other three fields<BR>values<BR>11 3 1 with other three fields<BR>v!
alues<BR><BR>TIA,<BR>Mahip Narayan<BR><BR>-- <BR>Author: Mahip Narayan<BR>INET: Mahip_at_mahindrabt.com<BR><BR>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051<BR>San Diego, California -- Public Internet access / Mailing Lists<BR>--------------------------------------------------------------------<BR>To REMOVE yourself from this mailing list, send an E-Mail message<BR>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in<BR>the message BODY, include a line containing: UNSUB ORACLE-L<BR>(or the name of mailing list you want to be removed from). You may<BR>also send the HELP command for other information (like subscribing). <BR></FONT></BLOCKQUOTE><BR><p><br><hr size=1><b>Do You Yahoo!?</b><br> Send instant messages with Yahoo! Messenger.
Received on Fri Jun 16 2000 - 14:22:44 CDT

Original text of this message

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