I am a beginner in learning SQL.The purpose is to find customers Returns for three consecutive payment period. Sample code
CustomerID Date 29696 2010-12-31 00:00:00.000 29696 2011-12-31 00:00:00.000 128000 2017-12-31 00:00:00.000 128000 2018-12-31 00:00:00.000 161792 2016-12-31 00:00:00.000 161792 2017-12-31 00:00:00.000 161792 2012-12-31 00:00:00.000 161792 2019-12-31 00:00:00.000 161792 2020-12-31 00:00:00.000 305152 2014-12-31 00:00:00.000 305152 2015-12-31 00:00:00.000 305152 2016-12-31 00:00:00.000 305152 2017-12-31 00:00:00.000 13578240 2011-12-31 00:00:00.000 13578240 2012-12-31 00:00:00.000 13578240 2013-12-31 00:00:00.000
https://stackoverflow.com/questions/66947120/is-there-away-to-find-3-consecutive-dates-eg-2012-2011-2010 April 05, 2021 at 08:51AM
没有评论:
发表评论