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

Home -> Community -> Mailing Lists -> Oracle-L -> QUERY HELP?

QUERY HELP?

From: Seema Singh <oracledbam_at_hotmail.com>
Date: Wed, 12 Sep 2001 07:14:55 -0700
Message-ID: <F001.0038B3E9.20010912052022@fatcity.com>

Hi
I need help to get query
sno is primary key of table

sday and eday will be between (1 and 15)

rowno, sday eday

1       2       5
2       4       4
3       4       5
4       8       9
5       9       10

the "day" output will be the no which can be equal to sday or equal to eday or between sday and eday

we should get output as

day     count
2       1 ( in row 1, 2 is equal to sday )
3       1 ( it is in row 1, b/n 2 and 5 )
4       3 ( in row 2,3 equal to sday and eday ,and b/n 2and5 in row 1 )
5       2 like that...
8       1
9       2
10      1


Thanks
Seema



Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Seema Singh
  INET: oracledbam_at_hotmail.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). Received on Wed Sep 12 2001 - 09:14:55 CDT

Original text of this message

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