Share via

SQL about unavailbility period

Rico Yung 1 Reputation point
2021-11-29T10:00:43.94+00:00

Table A_1:

gmt_create, unique_id, transaction_type

2021-11-21 01:23:34 10101 DEPOSIT
2021-11-21 01:23:34 10102 DEPOSIT
2021-11-21 01:23:35 10105 DEPOSIT
2021-11-21 01:23:35 10121 CLEARING
2021-11-21 01:23:35 10401 DEPOSIT
2021-11-21 01:23:35 11101 PAYOUT
2021-11-21 01:23:36 11701 DEPOSIT
................... ..... .......

How to write SQL to measure "Unavailability Period " from the table above?

Unavailability Period means a period of time commencing from the first minute where a defect, Incident or error of Partner’s System caused the actual Transaction volume processed by Partner’s System to be less than seventy percent (70%) of the Recent Average Transaction Volume continuously for ten (10) minutes or more, and ends on the first minute where the actual Transaction volume processed by Partner’s System exceeds seventy percent (70%) of the Recent Average Transaction Volume.

Recent Average Transaction Volume means the highest of the average number of Transactions per second

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.