Finds the most active stocks in the COMPUTER industry for a specific three day range.
The first 25 rows returned by this query are:
INSTRUMENT_ID TRADING_SYMBOL TRADESIZE RANKING 289 ALD 554400 1 493 ASZ 538700 2 850 BGS 529400 3 346 ANI 519300 4 866 BHI 516700 5 394 APE 504600 6 44 ABS 502800 7 400 APK 492000 8 360 ANW 490500 9 560 AVO 488800 10 507 ATN 485800 11 886 BIC 484600 12 752 BCY 484400 13 616 AXS 477500 14 356 ANS 477200 15 487 AST 477000 16 80 ADC 475700 17 230 AIW 474200 18 980 BLS 466700 19 810 BFE 464400 20 588 AWQ 463400 21 771 BDR 463000 22 930 BJU 462800 23 460 ARS 462300 24 773 BDT 458400 25 ...
-- Find the most active stocks in the COMPUTER industry -- for last three days. commit; SELECT st.INSTRUMENT_ID, st.TRADING_SYMBOL, SUM(TRADE_SIZE) TRADESIZE, DENSE_RANK() OVER (ORDER by SUM(TRADE_SIZE) DESC) as RANKING FROM STOCK_TRADE st inner join INSTRUMENT ii on ii.INSTRUMENT_ID = st.INSTRUMENT_ID inner join SCND_IDST_CLS sc on ii.SCND_IDST_CLS_ID = sc.SCND_IDST_CLS_ID and sc.SIC_NAME = 'COMPUTERS' WHERE st.TRADE_DATE BETWEEN '2005-11-10' AND '2005-11-14' GROUP BY st.INSTRUMENT_ID ,st.TRADING_SYMBOL ;