Patent Document ID: 10162729
Application ID: 15410156

Base Claim:
1. A computer-implemented method for automatically reviewing structured query language (SQL) statements, the computer-implemented method comprising, via one or more processors: receiving SQL code from a user seeking to access a database; parsing the SQL code to retrieve SQL keywords, mathematical operators, and logical operators; identifying the version of SQL that was used to create the SQL code; detecting pre-SQL-92 code based on a lack of newer SQL statement syntax: setting a temporary score if pre-SQL-92 code is detected; applying a complexity score calculation algorithm to the parsed SQL code to determine a presence of keywords and operators in the parsed SQL code; calculating a complexity score that varies according to a number of occurrences of keywords or operators and a variable complexity factor; executing the SQL code on a computing system which stores the database if the complexity score is less than or equal to a first threshold; flagging the SQL code to be reviewed by a computer administrator if the complexity score is greater than the first threshold; comparing the complexity score to a second threshold, greater than the first threshold; and returning the SQL code to an original coder to rewrite at least a portion of the SQL code in a different programming language if the complexity score is greater than the second threshold.

---

Claim 2:
2. The computer-implemented method of claim 1 , wherein the complexity score calculation algorithm calculates a temporary score for the retrieved keywords, mathematical operators, and logical operators.