SQL queries may really be a form of information request. Embedded in the implicit need for a SQL query may be an information question or request. How do I identify the information question asked in a query?
Is it possible to extract the information request from the query itself?
There is generally a business need which results in a request for a report which results in a SQL query. The information request may be in any number of places:
- The information request may be only in the mind of the person who looks at the report and interprets it. In other words in this case, the conversion from data to information occurs in the mind of the business person. In this case, you will have to ask the business user how they figure out the meaning from the report.
- The information request may be only in the layout of the queried data on the report pages. In other words the conversion from data to information occurs in the layout code of the report. In this case, the report code will need to be parsed in order to determine the relationships between the various data elements shown on the report.
- The information request may be only in the query itself which is used to build the report. In this case the conversion from data to information occurs in the selection of tables and columns included in the SQL query. In this case the information request might be extracted from the SQL query. Certain meanings will need to be cataloged for various kinds of data queried together.
- In all likelihood the information request will reside in a combination of two more of the above. In this case, you might parse out the low hanging fruit of the SQL and report layout code, and confirm with the business user
Thus, the answer to the question posed above “How do I identify the information question asked in a query?” is that it depends. You may luck out and be able to determine the information request from the SQL query. Or you may have to dig much deeper into parsing and interpreting the report code and asking the business user how they glean information from the report.