Home arrow Kognitio examples arrow Simple pivot operation
Simple pivot operation

kognitio_e3_thumb.pngThe most popular data analysis operation is to convert the results of a SQL query to a crosstab. 

Crosstabs make it easy to perform filtering, aggregation, and to visualize the data in a chart.  Often, users want to export their crosstabs to Microsoft Excel.

SQL doesn't have a crosstabs feature

Even though it is in such high demand, SQL has no built-in means to create crosstabs.

Microsoft added a Pivot command to its SQL Server line, you are required to hard-code data values.  This makes it not very useful.  Microsoft Excel can create Pivot Tables, but the UI is not easy, and it doesn't handle normal production volumes of data very well.  Business Intelligence vendors all having reporting and OLAP tools to create crosstabs but the price is very high. 

Nextanalytics reads SQL query results and makes the creation of crosstabs easy without a lot of overhead.

Priority 1: Keep your schema simple

First, Nextanalytics enables a simplified schema. In some cases, you you will not even need a separate table or reporting database because Nextanalytics can optionally take snapshots of data using a proprietary high perofrmance file thereby eliminating the need for a database modification.

Priority 2: Simplify the SQL 

Second, simple SQL queries can be used because Nextanalytics supports sequential processing which makes it far easier to develop reports than designing and implementing the "query from hell" a task that occupies a fair amount of time and budget in most companies.

In short, nextanalytics offers an easy alternative to create crosstabs, and it eliminates the overhead of creating and maintaining reporting tables, complex queries, cubes, metadata or pivot tables.

Working Example: Change tabular query results into a crosstab "by week"

We start with a simple SQL query to the Kognitio WX2 server with the results shown below.

kognitio_e3a.png

To make a crosstab, we will move the contents of the text column SALEWEEK to a new set of columns.

The values in the SALES column will automatically be placed under the correct week.  If there were more than one data column, then separate crosstabs would be made for each one.  Once the crosstab is completed, the SALEWEEK column itself is no longer needed and is deleted.

If there were multiple records that have a matching SALEWEEK value, then it is your choice to Sum them or choose another math operation. (Sum is the most popular).

The final optional step would be to sort the columns if a custom arrangement is desired.

This is what happens when a crosstab is created. 

kognitio_e3b.png

You can't do crosstabs with SQL but if you follow your SQL query with a short side step to Nextanalytics, it is easily done.  It's as simple as that.  The alternatives are cumbersome and expensive.

 
< Prev   Next >
evaluate.png

Weekly metrics dashboard

kognitio_e5j_thumb.png 

When building a dashboard, we need to help the viewer to see patterns in the data. With Nextanalytics, the flexible alerting capability allows us to easily highlight the top 10 items in multiple columns, immediately providing business insight. In this example, we'll look at top selling products by sales, as well as by percentage growth and net change over the previous period. Outstanding performers are high in all three. More...

Customer profitability trends

custprofittime5_thumb.png

Enhancing your dashboard with insightful reports is an analytics challenge, one which Nextanalytics was designed for. In this example, we take a simple revenue and expense report and with just a few simple steps, produce a highlighted report showing customer profitability trends. More...

Database supplied by Kognitio

This example was built on top of the Kognitio WX2 database, using their retail store demo. The Kognitio WX2 database can perform complex queries against a very large dataset and return the results very quickly. When coupled with Nextanalytics, the query result can be further processed and viewed in a wide variety of customizable and useful ways.

These examples demonstrate how Nextanalytics can leverage the power of the Kognitio WX2 database to deliver a complete high speed analytical solution. They are provided as an introduction to some of the things that can be done, even when working from a very large dataset with 11 billion records.  Everything you see is extensible and customizable.

Visit Kognitio's web site for more information.