NETEZZA – DATA LOAD PROCESS USING TEXT FILES

You can easily implement a loading process for you NETEZZA database, even if you don´t have access to an ETL tool. You can do it just following a few steps. Let´s say that you have a text file that needs to be loaded on the database, but you don´t have access to an ETL tool … Continue reading “NETEZZA – DATA LOAD PROCESS USING TEXT FILES”

SQL – CREATING A PROCEDURE TO CREATE TABLES DYNAMICALLY

This is just an exercise of how to work with dinamyc SQL inside procedures. This one is a very simple example of how create a procedure that will create objects according to the information that you will provide, in this case it will be a table. The procedure will receive two parameters: 1) The table … Continue reading “SQL – CREATING A PROCEDURE TO CREATE TABLES DYNAMICALLY”

SQL – EXCEPT and INTERSECT clauses

Let´s say that you have two tables that you want to know what they have in common and what they have different. You could query the two tables using the clause “EXISTS” and/or “NOT EXISTS” to retrieve the information you want. – What exist in PROJECT_A and do not exist in PROJECT_B – What exist … Continue reading “SQL – EXCEPT and INTERSECT clauses”

SQL – Creating Rankings On Existent Categories.

Let´s say that you are the CEO of a big chain of supermarkets, you know what are your best departments and your most profitable stores, but you would like to know what are your top 5 departments by store. Sales by Stores and Departments TOP 5 Departments It´s very simple to know what are the … Continue reading “SQL – Creating Rankings On Existent Categories.”

Data Modeling – What´s the point of organizing data?

In an environment where a very large volume of information is treated, it is necessary to define a way in which the information is structured and well defined, capable of determine (explicitly or implicitly) the flow of information and its relationships. As we can see in the picture above, the information is organized by “Entities”, … Continue reading “Data Modeling – What´s the point of organizing data?”

SQL – Updating a table using another table

This case is when you have data in one table that needs to be corrected with data from another table. It´s very simple, you can solve this problem with a small query, with a minimal cost for the database. Considering the case that you have two tables, one with the informantion of the department ( … Continue reading “SQL – Updating a table using another table”

SQL – Bringing results from different dates in different columns

Let´s say that you have a table with two columns (one for date and other for sales amounts) from which you need to sumarize the sales amounts by WEEK, MONTH, SEMESTER and YEAR. In this post you will see how do that easily, without subqueries and cheap for the database query processor. The data in … Continue reading “SQL – Bringing results from different dates in different columns”