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: Channa, Santhosh, SITS <schanna_at_att.com>
Date: Fri, 16 Jun 2000 14:59:13 -0400
Message-Id: <10530.109598@fatcity.com>


I 4got2 remove my test table "HELP" from that query. replace that table with your table name "CONTRACTOR_RATES".

Santhosh Babu

> ----------
> From: Channa, Santhosh, SITS
> Sent: Friday, June 16, 2000 1:58 PM
> To: 'ORACLE-L_at_fatcity.com'
> Subject: RE: Help - Query
>
> Hi Mahip,
>
> Try this query:
>
> select
> contractor_number,synthetic_code,issue_number,bt_rate,basic_rate,stores_ra
> te
> from help
> where (issue_number,contractor_number,synthetic_code) in
> (select max(issue_number),contrator_number,synthetic_code from help
> group by contrator_number,synthetic_code)
> order by 1,2;
>
>
>
> Santhosh Babu
>
> Work: 336 698 2377
> Home: 336 294 8076
> Fax : 336 698 2385
> <<OLE Object: Picture (Metafile)>>
>
>
> ----------
> From: Mahip Narayan[SMTP:Mahip_at_mahindrabt.com]
> Sent: Friday, June 16, 2000 11:04 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Help - Query
>
> 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
Received on Fri Jun 16 2000 - 13:59:13 CDT

Original text of this message

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