I have a table that looks like this…
Account Status Date Attempt(*)
A In_PROGRESS 12/12/2017 1 A In_PROGRESS 13/12/2017 1 A SUCCESS 15/12/2017 1 B ERROR 10/12/2017 1 B SUCCESS 13/12/2017 2 C IN_PROGRESS 11/12/2017 1 C ERROR 13/12/2017 1 C ERROR 14/12/2017 2 C IN_PROGRESS 15/12/2017 3 C IN_PROGRESS 17/12/2017 3
I want to get the Attempt(*) column.
ERROR and SUCCESS are end states; i.e and attempt ends with either ERROR or SUCCESS. IN_PROGRESS is a transitory status. For example, the entries for Account C read as follows:
ROW 1: The first attempt is IN_PROGRESS
ROW 2: the first attempt produced an ERROR
ROW 3: The second attempt produced an ERROR
ROW 4: The third attempt is IN_PROGRESS
ROW 5: The third attempt is still IN_PROGRESS
The table gets appended every day with an update on the status of each account.
I am using SQL Server management Studio 2008, so I do not have access to LAG and LEAD. I am also fairly new to SQL, so an explanation of the logic behind the solution would be great for me.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!