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”