Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 2

Displaying posts with tag: crosstab (reset)

Crosstabs cell-shifting
+0 Vote Up -0Vote Down

A crosstab query is a specific query used to create aggregate reports on two or more fields, it’s  a handy way to display summary information. At Open Query we have customers using that trick to display production schedules.

The summary table is generated from the database to extract the manufacturing date (mand), unit number (unitn), product area (pro_area), and ranking (rnk). Then we can start using that summary table to process our crosstab. The summary table looks like this:

mand unitn pro_area rnk 2009-12-15 587-MWI2-PP49 1 11 2009-12-15 587-MWI2-PP50 1 10 2009-12-16 670-W1101 1 11 2009-12-17 670-W1102 1 7 2009-12-16 670-W1103 1 10 2009-12-16 683-BR107-S2-01 12 9 2009-12-18 683-BR107-S4-05a 12 11 2009-12-18 683-BR107-S5-06 12 10 2009-12-15 691-02-105 1 9 2009-12-16 691-02-107 1 8 2009-12-17 691-03-101 1 6 2009-12-17 691-03-105 1 5

Starting from

  [Read more...]
Multi dimensional cubes in MySQL through Gearman
+4 Vote Up -0Vote Down



I gave two presentations about Gearman at the Linux.conf.au. As part of the preparation for these talks, I created several sample applications. One of them, about remote replication administration, I will cover in a separate post. The most amazing one, which I cover here, is a quick and painless solution for multiple level crosstabs in MySQL.

Some background is needed. Crosstabs (also called data cubes or pivot tables, have been one of my favorite hacks for long time. In 2001 I wrote an article about a simple




  [Read more...]
Showing entries 1 to 2

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.