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 -> difficult sql query, how to make a hitlist of couple ?

difficult sql query, how to make a hitlist of couple ?

From: georg.heiss <georg.heiss_at_gmx.de>
Date: 5 Dec 2004 08:37:50 -0800
Message-ID: <bc65bf99.0412050837.739be7e6@posting.google.com>


Hi all,

My Table "buyer_was_in_shop" has only 2 colums:

buyer_id (pk), shop_concate (varchar2(400))

select * from buyer_was_in_shop;

BUYER_ID SHOP_CONCATE

875234   "24111:19112:23:1132:9"
100826   "21987:23"
123457   "9:19112" 
783489   "43:987"
787638   "33:19112:9" 

.

The Table has 12.000.000 Rows and the Maximum of shops per buyer is 7. How can i do a Ranking with a couple of shops with the maximum of same buyers?
Example:
Winner is the couple of shop 9 an 19112, because there is a maximum of 3 same buyers!

Can i solve this complex Problem with PL/SQL ?

Thanks Georg Received on Sun Dec 05 2004 - 10:37:50 CST

Original text of this message

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