We have learned how to write queries to analyze data and perform simple calculations. In this section, we will take this a step further. We will use SQL functions to create custom reports based on our data and will learn how to analyze trends in our data.
Use CASE statements to structure data and create new attributes.
Combine multiple subqueries into one using “AS.”
Temporary Tables and Subqueries.
Determining data trends through advanced reporting.
A database is a collection of logically interrelated data and description of this data, designed to meet the information needs for organization. The primary objective of creating a database is to store, update and retrieve data efficiently and use it for analysis. The data stored can also include any transient data such as input documents, reports and intermediate results obtained during processing of the data. To achieve this, database must have different characteristics and some of them are:
It should have a structure which deals with data types and data behavior.
It should have a proper retrieval method which could be a declarative query language (like SQL, which we'll talk about in this article) or a procedural database programming language (like Java or Python).