by shigemk2

当面は技術的なことしか書かない

サブクエリ結合

select ID, PRICE from PRODUCT A1 where A1.PRICE = '6000' and A1.YMD = '2014/04/15 00:00:00' and A1.PRICE > (select A2.PRICE from PRODUCT A2 where A1.ID = A2.ID and A2.YMD = '2014/03/15 00:00:00') and rownum <= 10;

先月と今月でくらべて値段あがったやつをピックアップとか。