DASH-173 changed sql to remove repeating items either passed the max timestamp, or already processed for max count allowed
DASH-173 changed sql to remove repeating items either passed the max timestamp, or already processed for max count allowed

git-svn-id: 94801a84d9915af359e670398e3db586b2e03627@313555 66ffb92e-73f9-0310-93c1-f5514f145a0a

kingmook/sakai,rodriguezdevera/sakai,udayg/sakai,wfuedu/sakai,Fudan-University/sakai,kingmook/sakai,puramshetty/sakai,zqian/sakai,duke-compsci290-spring2016/sakai,Fudan-University/sakai,bzhouduke123/sakai,tl-its-umich-edu/sakai,tl-its-umich-edu/sakai,wfuedu/sakai,zqian/sakai,kingmook/sakai,Fudan-University/sakai,hackbuteer59/sakai,introp-software/sakai,bzhouduke123/sakai,lorenamgUMU/sakai,ouit0408/sakai,OpenCollabZA/sakai,bzhouduke123/sakai,bkirschn/sakai,ktakacs/sakai,tl-its-umich-edu/sakai,buckett/sakai-gitflow,introp-software/sakai,whumph/sakai,bkirschn/sakai,willkara/sakai,kwedoff1/sakai,bzhouduke123/sakai,willkara/sakai,zqian/sakai,clhedrick/sakai,kwedoff1/sakai,zqian/sakai,Fudan-University/sakai,clhedrick/sakai,lorenamgUMU/sakai,clhedrick/sakai,whumph/sakai,willkara/sakai,bkirschn/sakai,rodriguezdevera/sakai,udayg/sakai,clhedrick/sakai,kingmook/sakai,conder/sakai,hackbuteer59/sakai,noondaysun/sakai,pushyamig/sakai,wfuedu/sakai,bzhouduke123/sakai,tl-its-umich-edu/sakai,buckett/sakai-gitflow,Fudan-University/sakai,puramshetty/sakai,wfuedu/sakai,buckett/sakai-gitflow,bkirschn/sakai,liubo404/sakai,pushyamig/sakai,surya-janani/sakai,bkirschn/sakai,ktakacs/sakai,clhedrick/sakai,liubo404/sakai,duke-compsci290-spring2016/sakai,zqian/sakai,introp-software/sakai,kingmook/sakai,udayg/sakai,pushyamig/sakai,noondaysun/sakai,willkara/sakai,conder/sakai,Fudan-University/sakai,noondaysun/sakai,udayg/sakai,ktakacs/sakai,noondaysun/sakai,OpenCollabZA/sakai,ktakacs/sakai,whumph/sakai,conder/sakai,colczr/sakai,OpenCollabZA/sakai,colczr/sakai,pushyamig/sakai,conder/sakai,lorenamgUMU/sakai,introp-software/sakai,zqian/sakai,frasese/sakai,surya-janani/sakai,pushyamig/sakai,ouit0408/sakai,zqian/sakai,frasese/sakai,kingmook/sakai,lorenamgUMU/sakai,bzhouduke123/sakai,willkara/sakai,puramshetty/sakai,whumph/sakai,pushyamig/sakai,puramshetty/sakai,kingmook/sakai,introp-software/sakai,colczr/sakai,hackbuteer59/sakai,bzhouduke123/sakai,lorenamgUMU/sakai,conder/sakai,tl-its-umich-edu/sakai,kwedoff1/sakai,buckett/sakai-gitflow,noondaysun/sakai,noondaysun/sakai,hackbuteer59/sakai,conder/sakai,puramshetty/sakai,bzhouduke123/sakai,introp-software/sakai,duke-compsci290-spring2016/sakai,rodriguezdevera/sakai,udayg/sakai,puramshetty/sakai,colczr/sakai,bkirschn/sakai,ouit0408/sakai,rodriguezdevera/sakai,willkara/sakai,liubo404/sakai,rodriguezdevera/sakai,udayg/sakai,joserabal/sakai,liubo404/sakai,willkara/sakai,buckett/sakai-gitflow,duke-compsci290-spring2016/sakai,hackbuteer59/sakai,joserabal/sakai,surya-janani/sakai,ouit0408/sakai,frasese/sakai,puramshetty/sakai,liubo404/sakai,clhedrick/sakai,duke-compsci290-spring2016/sakai,joserabal/sakai,conder/sakai,Fudan-University/sakai,surya-janani/sakai,hackbuteer59/sakai,introp-software/sakai,OpenCollabZA/sakai,udayg/sakai,kwedoff1/sakai,joserabal/sakai,joserabal/sakai,OpenCollabZA/sakai,willkara/sakai,ktakacs/sakai,ktakacs/sakai,introp-software/sakai,kwedoff1/sakai,buckett/sakai-gitflow,bkirschn/sakai,wfuedu/sakai,surya-janani/sakai,ouit0408/sakai,wfuedu/sakai,rodriguezdevera/sakai,liubo404/sakai,frasese/sakai,zqian/sakai,whumph/sakai,ktakacs/sakai,whumph/sakai,surya-janani/sakai,lorenamgUMU/sakai,clhedrick/sakai,udayg/sakai,pushyamig/sakai,ouit0408/sakai,OpenCollabZA/sakai,surya-janani/sakai,clhedrick/sakai,kwedoff1/sakai,buckett/sakai-gitflow,lorenamgUMU/sakai,puramshetty/sakai,bkirschn/sakai,kwedoff1/sakai,OpenCollabZA/sakai,frasese/sakai,joserabal/sakai,colczr/sakai,frasese/sakai,conder/sakai,frasese/sakai,tl-its-umich-edu/sakai,frasese/sakai,kingmook/sakai,wfuedu/sakai,duke-compsci290-spring2016/sakai,ouit0408/sakai,noondaysun/sakai,colczr/sakai,whumph/sakai,surya-janani/sakai,ouit0408/sakai,joserabal/sakai,colczr/sakai,whumph/sakai,kwedoff1/sakai,buckett/sakai-gitflow,wfuedu/sakai,ktakacs/sakai,joserabal/sakai,colczr/sakai,lorenamgUMU/sakai,OpenCollabZA/sakai,hackbuteer59/sakai,hackbuteer59/sakai,liubo404/sakai,liubo404/sakai,tl-its-umich-edu/sakai,noondaysun/sakai,tl-its-umich-edu/sakai,duke-compsci290-spring2016/sakai,rodriguezdevera/sakai,Fudan-University/sakai,pushyamig/sakai,rodriguezdevera/sakai,duke-compsci290-spring2016/sakai