chirag_patel5141
New Member
- Joined
- Jun 4, 2016
- Messages
- 10
Hi All,
I want to Count the Duplicate entries in the column "SYMBOL" with the refeance of column "EXPIRY_DT" and also want to number them like...
IF 31-Mar-16 than BANKNIFTY-I , 28-Apr-16 than BANKNIFTY-II & 26-MAY-16 than BANKNIFTY-III
[TABLE="width: 664"]
<tbody>[TR]
[TD]INSTRUMENT[/TD]
[TD]"SYMBOL"[/TD]
[TD]"EXPIRY_DT"[/TD]
[TD]OPEN[/TD]
[TD]HIGH[/TD]
[TD]LOW[/TD]
[TD]CLOSE[/TD]
[TD]OPEN_INT[/TD]
[TD]CHG_IN_OI"[/TD]
[TD]TIMESTAMP"[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]BANKNIFTY[/TD]
[TD="align: right"]31-Mar-16[/TD]
[TD="align: right"]15745[/TD]
[TD="align: right"]15965.7[/TD]
[TD="align: right"]15740[/TD]
[TD="align: right"]15941.55[/TD]
[TD="align: right"]2350350[/TD]
[TD="align: right"]194280[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]BANKNIFTY[/TD]
[TD="align: right"]28-Apr-16[/TD]
[TD="align: right"]15816[/TD]
[TD="align: right"]16036[/TD]
[TD="align: right"]15816[/TD]
[TD="align: right"]16017.55[/TD]
[TD="align: right"]294210[/TD]
[TD="align: right"]23010[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]BANKNIFTY[/TD]
[TD="align: right"]26-May-16[/TD]
[TD="align: right"]15876.1[/TD]
[TD="align: right"]16049.95[/TD]
[TD="align: right"]15850[/TD]
[TD="align: right"]16042.95[/TD]
[TD="align: right"]104490[/TD]
[TD="align: right"]840[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]13-Apr-16[/TD]
[TD="align: right"]17460[/TD]
[TD="align: right"]17512.5[/TD]
[TD="align: right"]17440[/TD]
[TD="align: right"]17507.5[/TD]
[TD="align: right"]16950[/TD]
[TD="align: right"]3060[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]20-May-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]16740[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]17-Jun-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]16385[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]16-Sep-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]16702.5[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]16-Dec-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]18835[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]17-Mar-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]18965[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]13-Apr-16[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]20-May-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6091[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]17-Jun-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7242[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]16-Sep-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6637[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]16-Dec-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6570[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]17-Mar-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6728[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTY[/TD]
[TD="align: right"]31-Mar-16[/TD]
[TD="align: right"]7623.5[/TD]
[TD="align: right"]7723.2[/TD]
[TD="align: right"]7615.2[/TD]
[TD="align: right"]7713.35[/TD]
[TD="align: right"]21508425[/TD]
[TD="align: right"]-751800[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTY[/TD]
[TD="align: right"]28-Apr-16[/TD]
[TD="align: right"]7664.9[/TD]
[TD="align: right"]7761.4[/TD]
[TD="align: right"]7658.4[/TD]
[TD="align: right"]7750.8[/TD]
[TD="align: right"]4290900[/TD]
[TD="align: right"]391575[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTY[/TD]
[TD="align: right"]26-May-16[/TD]
[TD="align: right"]7677.45[/TD]
[TD="align: right"]7773.4[/TD]
[TD="align: right"]7672.15[/TD]
[TD="align: right"]7763.7[/TD]
[TD="align: right"]1075425[/TD]
[TD="align: right"]77775[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTYINFRA[/TD]
[TD="align: right"]31-Mar-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2565[/TD]
[TD="align: right"]150[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTYINFRA[/TD]
[TD="align: right"]28-Apr-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2440.95[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTYINFRA[/TD]
[TD="align: right"]26-May-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2330.45[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
</tbody>[/TABLE]
I want to Count the Duplicate entries in the column "SYMBOL" with the refeance of column "EXPIRY_DT" and also want to number them like...
IF 31-Mar-16 than BANKNIFTY-I , 28-Apr-16 than BANKNIFTY-II & 26-MAY-16 than BANKNIFTY-III
[TABLE="width: 664"]
<tbody>[TR]
[TD]INSTRUMENT[/TD]
[TD]"SYMBOL"[/TD]
[TD]"EXPIRY_DT"[/TD]
[TD]OPEN[/TD]
[TD]HIGH[/TD]
[TD]LOW[/TD]
[TD]CLOSE[/TD]
[TD]OPEN_INT[/TD]
[TD]CHG_IN_OI"[/TD]
[TD]TIMESTAMP"[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]BANKNIFTY[/TD]
[TD="align: right"]31-Mar-16[/TD]
[TD="align: right"]15745[/TD]
[TD="align: right"]15965.7[/TD]
[TD="align: right"]15740[/TD]
[TD="align: right"]15941.55[/TD]
[TD="align: right"]2350350[/TD]
[TD="align: right"]194280[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]BANKNIFTY[/TD]
[TD="align: right"]28-Apr-16[/TD]
[TD="align: right"]15816[/TD]
[TD="align: right"]16036[/TD]
[TD="align: right"]15816[/TD]
[TD="align: right"]16017.55[/TD]
[TD="align: right"]294210[/TD]
[TD="align: right"]23010[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]BANKNIFTY[/TD]
[TD="align: right"]26-May-16[/TD]
[TD="align: right"]15876.1[/TD]
[TD="align: right"]16049.95[/TD]
[TD="align: right"]15850[/TD]
[TD="align: right"]16042.95[/TD]
[TD="align: right"]104490[/TD]
[TD="align: right"]840[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]13-Apr-16[/TD]
[TD="align: right"]17460[/TD]
[TD="align: right"]17512.5[/TD]
[TD="align: right"]17440[/TD]
[TD="align: right"]17507.5[/TD]
[TD="align: right"]16950[/TD]
[TD="align: right"]3060[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]20-May-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]16740[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]17-Jun-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]16385[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]16-Sep-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]16702.5[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]16-Dec-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]18835[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]DJIA[/TD]
[TD="align: right"]17-Mar-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]18965[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]13-Apr-16[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]6398[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]20-May-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6091[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]17-Jun-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7242[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]16-Sep-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6637[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]16-Dec-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6570[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]FTSE100[/TD]
[TD="align: right"]17-Mar-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6728[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTY[/TD]
[TD="align: right"]31-Mar-16[/TD]
[TD="align: right"]7623.5[/TD]
[TD="align: right"]7723.2[/TD]
[TD="align: right"]7615.2[/TD]
[TD="align: right"]7713.35[/TD]
[TD="align: right"]21508425[/TD]
[TD="align: right"]-751800[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTY[/TD]
[TD="align: right"]28-Apr-16[/TD]
[TD="align: right"]7664.9[/TD]
[TD="align: right"]7761.4[/TD]
[TD="align: right"]7658.4[/TD]
[TD="align: right"]7750.8[/TD]
[TD="align: right"]4290900[/TD]
[TD="align: right"]391575[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTY[/TD]
[TD="align: right"]26-May-16[/TD]
[TD="align: right"]7677.45[/TD]
[TD="align: right"]7773.4[/TD]
[TD="align: right"]7672.15[/TD]
[TD="align: right"]7763.7[/TD]
[TD="align: right"]1075425[/TD]
[TD="align: right"]77775[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTYINFRA[/TD]
[TD="align: right"]31-Mar-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2565[/TD]
[TD="align: right"]150[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTYINFRA[/TD]
[TD="align: right"]28-Apr-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2440.95[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
[TR]
[TD]FUTIDX[/TD]
[TD]NIFTYINFRA[/TD]
[TD="align: right"]26-May-16[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2330.45[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]21-Mar-16[/TD]
[/TR]
</tbody>[/TABLE]