SlideShare a Scribd company logo
Giuseppe Maxia
Pivot Tables in 
MySQL 5
About me
http://datacharmer.org
Agenda
●
Introducing pivot tables
●
Common solutions
●
The SQL way
●
Pivot tables with stored
procedures
●
The OO approach
3
Introducing pivot tables (1)
●
Pivot tables, or CROSSTABS
●
Statistical reports
●
Spreadsheets tools
●
Usually on the client side
●
On servers, dedicated tools
●
Some vendors have language
extensions
●
Can be done in standard SQL
4
Introducing pivot tables (2)
Some online resources
●
MySQL wizardry (2001)
●
DBIx::SQLCrosstab (2004)
●
See the addresses on my site
(http://datacharmer.org)
5
Introducing pivot tables (3)
An example (raw data)
+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
|            person            |
+­­­­+­­­­­­­­+­­­­­­­­+­­­­­­­+
| id | name   | gender | dept  |
+­­­­+­­­­­­­­+­­­­­­­­+­­­­­­­+
|  1 | John   | m      | pers  |
|  2 | Mario  | m      | pers  |
|  7 | Mary   | f      | pers  |
|  8 | Bill   | m      | pers  |
|  3 | Frank  | m      | sales |
|  5 | Susan  | f      | sales |
|  6 | Martin | m      | sales |
|  4 | Otto   | m      | dev   |
|  9 | June   | f      | dev   |
+­­­­+­­­­­­­­+­­­­­­­­+­­­­­­­+
6
Introducing pivot tables (4)
An example (crosstab)
+­­­­­­­­­­­­­­­­­­­­­­­­­+
|    dept by gender       |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dept  | m  | f  | total |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dev   |  1 |  1 |     2 |
| pers  |  3 |  1 |     4 |
| sales |  2 |  1 |     3 |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
7
Introducing pivot tables (5)
Definitions
+­­­­­­­­­­­­­­­­­­­­­­­­­+
|    dept by gender       |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dept  | m  | f  | total |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dev   |  1 |  1 |     2 |
| pers  |  3 |  1 |     4 |
| sales |  2 |  1 |     3 |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
8
Row
headers
Column
headers
Introducing pivot tables (6)
Definitions
+­­­­­­­­­­­­­­­­­­­­­­­­­+
|    dept by gender       |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dept  | m  | f  | total |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dev   |  1 |  1 |     2 |
| pers  |  3 |  1 |     4 |
| sales |  2 |  1 |     3 |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
9
Row
headers
Column
headers
Distinct
values
Introducing pivot tables (7)
Definitions
+­­­­­­­­­­­­­­­­­­­­­­­­­+
|    dept by gender       |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dept  | m  | f  | total |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
| dev   |  1 |  1 |     2 |
| pers  |  3 |  1 |     4 |
| sales |  2 |  1 |     3 |
+­­­­­­­+­­­­+­­­­+­­­­­­­+
10
Row
headers
Column
headers
Calculated
values
Distinct
values
Introducing pivot tables (8)
Some important points
●
Row headers are defined in
one go
●
Column headers are defined
in two separate steps.
11
Common solutions
●
The spreadsheets approach
●
Using dedicated tools
12
The spreadsheet approach (1)
●
Copy the raw data from the
server to a spreadsheet
●
Use the Pivot Table feature
13
The spreadsheet approach (2)
14
The spreadsheet approach (3)
15
The spreadsheet problems (4)
●
Copying the raw data could
be a long operation
●
The spreadsheet can handle a
limited number of records
●
The results could be different
in different clients
●
It is not easy to scale
16
Dedicated tools
PRO
●
Easy to use
●
Rich in features
●
Well integrated to BI
packages
17
Dedicated tools
CON
●
Client side tools are resource
hogs
●
Server side tools are either
complicated to install and
maintain or expensive (or
both)
18
The SQL way (1)
The query for that crosstab
SELECT dept,
    COUNT(CASE 
      WHEN gender = 'm' THEN id 
      ELSE NULL END) AS m,
    COUNT(CASE 
      WHEN gender = 'f' 
      THEN id ELSE NULL END) AS f,
    COUNT(*) AS total
FROM person 
GROUP BY dept
19
row
header
The SQL way (2)
The query for that crosstab
SELECT dept,
    COUNT(CASE 
      WHEN gender = 'm' THEN id 
      ELSE NULL END) AS m,
    COUNT(CASE 
      WHEN gender = 'f' 
      THEN id ELSE NULL END) AS f,
    COUNT(*) AS total
FROM person 
GROUP BY dept
20
column
headers
The SQL way (3)
Two passes
SELECT dept,
    COUNT(CASE 
      WHEN gender = 'm' THEN id 
      ELSE NULL END) AS m,
    COUNT(CASE 
      WHEN gender = 'f' 
      THEN id ELSE NULL END) AS f,
    COUNT(*) AS total
FROM person 
GROUP BY dept
21
Previously
determined
Calculated
in this query
The SQL way (4)
Two passes
# 1
SELECT DISTINCT gender FROM person;
+­­­­­­­­+
| gender |
+­­­­­­­­+
| m      |
| f      |
+­­­­­­­­+
# build the second query
# 2
CROSSTAB QUERY
22
The SQL way (5)
PROBLEMS
●
The two passes are not
coordinated
●
External languages needed
(Perl, PHP, Java, etc.)
●
For each language, you need
appropriate routines
23
Pivot tables and stored
routines (1)
PRO
●
Bundling the two steps for
crosstab creation
●
Adding features easily
●
Same interface from different
host languages
24
Pivot tables and stored
routines (2)
CON
●
Less expressive than most
languages
●
More burden for the server
25
Methods to gather column
headers (1)
●
GROUP_CONCAT
●
Cursor + temporary table
●
Cursor + dedicated routines
26
GROUP_CONCAT (1)
SELECT GROUP_CONCAT(DISTINCT gender) 
AS column_list FROM person;
+­­­­­­­­­­­­­+
| column_list |
+­­­­­­­­­­­­­+
| m,f         |
+­­­­­­­­­­­­­+
27
GROUP_CONCAT (2)
SELECT GROUP_CONCAT(DISTINCT 
CONCAT('nCOUNT(CASE WHEN gender= "', 
gender, '" THEN id ELSE NULL END) AS 
', gender)) AS column_list 
FROM personG
column_list:
COUNT(CASE WHEN gender= "m" THEN id 
ELSE NULL END) AS m,
COUNT(CASE WHEN gender= "f" THEN id 
ELSE NULL END) AS f
28
GROUP_CONCAT (3)
PRO
●
Easy to use
●
Dynamic
●
Fast (built-in)
29
GROUP_CONCAT (4)
CON
●
Memory limit (1024 bytes)
●
Can be increased by setting
group_concat_max_len
●
But you can't know the length
in advance
30
Cursor (1)
# outline only
DECLARE dp char(10);
DECLARE column_list TEXT default '';
DECLARE CURSOR get_cols FOR
  SELECT DISTINCT dept FROM person;
OPEN get_cols;
LOOP
   FETCH get_cols INTO dp;
   SET column_list=CONCAT(column_list, 
',', dp);
END LOOP;
31
Cursor (2)
PRO
●
No memory limits
●
Fast
32
Cursor (3)
CON
●
Not dynamic
●
Verbose
33
Cursor + temp table (1)
# dynamic query
SET @q = CONCAT('CREATE TABLE temp 
SELECT DISTINCT ', col_name, ' AS mycol 
FROM ', table_name);
PREPARE d FROM @q
EXECUTE d;
# routine with cursor 
DECLARE dp char(10);
DECLARE column_list TEXT default '';
DECLARE CURSOR get_cols FOR
  SELECT mycol FROM temp;
34
Cursor + temp table (2)
PRO
●
No memory limits
●
dynamic
35
Cursor + temp table (2)
CON
●
Requires a new table for each
crosstab
●
Data needs to be read twice
36
Cursor + dedicated routine
(1)
# Create a routine from a template
# use routine with cursor 
DECLARE dp char(10);
DECLARE column_list TEXT default '';
DECLARE CURSOR get_cols FOR
  SELECT gender FROM person;
37
Cursor + dedicated routine
(2)
PRO
●
No memory limits
●
data is read only once
●
no temporary tables
38
Cursor + dedicated routine
(3)
CON
●
Not dynamic
●
Dedicated routines need to
be created by external
language
39
Cursor + Higher Order
Routines (1)
●
Higher Order Routines are
routines that create other
routines
●
It IS NOT STANDARD
●
It is, actually, a hack
40
Cursor + Higher Order
Routines (2)
●
Very UNOFFICIALLY
●
You can create a routine from
a MySQL routine
41
Cursor + Higher Order
Routines (3)
PRO
●
Dynamic
●
No memory limits
●
No temporary tables
●
Data is read only once
●
Efficient
42
Cursor + Higher Order
Routines (4)
CON
●
You need just ONE ROUTINE
created with SUPER
privileges (access to
mysql.proc table)
43
44
DISCLAIMERDISCLAIMER
The Very UnofficialVery Unofficial method
described in this presentation:
➢
Is notnot recommended by MySQL AB
➢
Is notnot guaranteed to work in future
releases of MySQL
➢
May result in any number of
damages to your data, from bird
flu to accidental explosions.
➢
You use it at your own risk
HACK!HACK!
Cursor + Higher Order
Routines (5)
HOW
●
Download the code (all SQL)
●
(http://datacharmer.org)
●
Unpack and run
mysql ­t < crosstab_install.mysql
●
then use it
mysql> CALL crosstab_help()
45
Crosstab package (1)
CALL crosstab_help()
type "SELECT crosstab_usage()G for 
general usage"
type "SELECT crosstab_example()G" for 
a few examples
type "SELECT crosstab_env()G" for 
modifiers and debugging
46
Crosstab package (2)
SELECT crosstab_usage()G 
    == CROSSTAB USAGE ==
    ====================
    PROCEDURE get_crosstab_simple (
        row_name      varchar(50),   
   ­­ the field that identifies each row
        col_name      varchar(50),   
   ­­ from which column we spread the values
        op            varchar(10),   
   ­­ which operation (COUNT, SUM, AVG)
        op_col        varchar(50),   
   ­­ to which column we operate
        from_clause   varchar(1000)  
   ­­ the data origin
    )
47
Crosstab package (3)
# A SIMPLE EXAMPLE
set @XTAB_FORMAT = "show";
call get_crosstab_simple (
 "department",    ­­ row_name
 "gender",        ­­ col_name
 "COUNT",         ­­ op
 "person_id",     ­­ op_col
 "person inner join departments using 
(dept_id)"        ­­ from_clause
);
48
Crosstab package (4)
# A SIMPLE EXAMPLE (2)
+­­­­­­­­­­­­+­­­+­­­+­­­­­­­+
| department | m | f | total |
+­­­­­­­­­­­­+­­­+­­­+­­­­­­­+
| dev        | 1 | 1 |     2 |
| pers       | 3 | 1 |     4 |
| sales      | 2 | 1 |     3 |
+­­­­­­­­­­­­+­­­+­­­+­­­­­­­+
49
Crosstab package (5)
# Another EXAMPLE
set @XTAB_FORMAT = "show";
set @WITH_ROLLUP = 1;
call get_crosstab_simple (
 "gender",        ­­ row_name
 "department",    ­­ col_name
 "COUNT",         ­­ op
 "person_id",     ­­ op_col
 "person inner join departments using 
(dept_id)"        ­­ from_clause
);
50
Crosstab package (6)
# Another EXAMPLE (2)
+­­­­­­­­+­­­­­­+­­­­­­­+­­­­­+­­­­­­­+
| gender | pers | sales | dev | total |
+­­­­­­­­+­­­­­­+­­­­­­­+­­­­­+­­­­­­­+
| f      |    1 |     1 |   1 |     3 |
| m      |    3 |     2 |   1 |     6 |
| NULL   |    4 |     3 |   2 |     9 |
+­­­­­­­­+­­­­­­+­­­­­­­+­­­­­+­­­­­­­+
51
Crosstab package (7)
# Some input modifiers
@XTAB_FORMAT={show|table|query}
@WITH_ROLLUP=1
@XTAB_ENGINE={MyISAM|memory}
@XTAB_TYPE=temporary
52
Crosstab package (8)
# Some output variables
@XTAB_QUERY   
query to create the requested crosstab
@XTAB_TABLE
the table being created when requested
53
One step further
Object Oriented Crosstabs (1)
●
Based on the Crosstab
package
●
Requires the MySQL Stored
Routines Library (mysql-sr-lib)
http://datacharmer.org
●
It's a O-O like approach
54
Object Oriented crosstab (2)
HOW
●
Download the code (all SQL)
●
(http://datacharmer.org)
●
Unpack and run
mysql < oo_crosstab_install.mysql
●
then use it
mysql> CALL oo_crosstab_help()
55
Object Oriented Crosstab (3)
SELECT oo_crosstab_usage()G 
    == Object Oriented CROSSTAB USAGE ==
PROCEDURE xtab_new( crosstab_name varchar(50) );
PROCEDURE xtab_set( crosstab_name, p_param_name, 
p_param_value )
PROCEDURE xtab_check( crosstab_name )
PROCEDURE xtab_show( crosstab_name)
PROCEDURE xtab_exec( crosstab_name)
PROCEDURE xtab_drop( crosstab_name)
56
Object Oriented Crosstab (4)
# An example
CALL xtab_new("dept_by_gender");
CALL xtab_set("dept_by_gender", "row_name", 
"department");
CALL xtab_set("dept_by_gender", "col_name", 
"gender");
CALL xtab_set("dept_by_gender", "op", "COUNT");
CALL xtab_set("dept_by_gender", "op_col",  
"person_id");
CALL xtab_check("dept_by_gender");
+­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
| check result | error message                                   |
+­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
|            0 | dept_by_gender: parameter <from_clause> not set |
+­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
57
Object Oriented Crosstab (5)
# An example (continue)
CALL xtab_show("dept_by_gender");
+­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­+­­­­­­­­+
| xtab_parameter | xtab_value     | check  |
+­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­+­­­­­­­­+
|                |*dept_by_gender*| ok     |
| ­­­            | ­­­            | ­­­    |
| row_name       | department     | ok     |
| col_name       | gender         | ok     |
| id_name        | NULL           | ­      |
| col_from       | NULL           | ­      |
| op             | COUNT          | ok     |
| op_col         | person_id      | ok     |
| from_clause    | NULL           | NOT OK |
| where_clause   | NULL           | ­      |
| wanted_result  | NULL           | ­      |
+­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­+­­­­­­­­+
58
Object Oriented Crosstab (6)
# An example (continue)
CALL xtab_set("dept_by_gender", "from_clause", 
"person INNER JOIN departments using(dept_id)");
CALL xtab_check("dept_by_gender");
+­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­+
| check result | error message |
+­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­+
|            1 | NULL          |
+­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­+
59
Object Oriented Crosstab (7)
# An example (continue)
CALL xtab_exec("dept_by_gender");
+­­­­­­­­­­­­+­­­+­­­+­­­­­­­+
| department | m | f | total |
+­­­­­­­­­­­­+­­­+­­­+­­­­­­­+
| dev        | 1 | 1 |     2 |
| pers       | 3 | 1 |     4 |
| sales      | 2 | 1 |     3 |
+­­­­­­­­­­­­+­­­+­­­+­­­­­­­+
60
Object Oriented Crosstab (8)
# Another example (continues)
CALL xtab_copy_from('gender_by_dept', 
'dept_by_gender', 'transpose');
CALL xtab_exec('gender_by_dept');
+­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­+
| gender | pers  | sales | dev  | total |
+­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­+
| f      |  5500 |  5500 | 6000 | 17000 |
| m      | 16000 | 10500 | 6000 | 32500 |
+­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­+
61
Object Oriented Crosstab (9)
# Exporting crosstabs
SELECT xtab_export('gender_by_dept', 
'compact')G
****************** 1. row ********************
CALL xtab_new('gender_by_dept');
CALL xtab_fill('gender_by_dept', 
'row_name=>gender;
col_name=>department;
id_name=>N;
col_from=>N;
op=>sum;
op_col=>salary;
from_clause=>person inner join departments 
using(dept_id);
where_clause=>N;
wanted_result=>N')
62
Object Oriented Crosstab (10)
# Exporting crosstabs
SELECT xtab_export('gender_by_dept', 
'detailed')G
****************** 1. row ********************
xtab_export('gender_by_dept', 'detailed'):
CALL xtab_new('gender_by_dept');
CALL xtab_set('gender_by_dept','row_name','gender');
CALL xtab_set('gender_by_dept','col_name','department');
CALL xtab_set('gender_by_dept','id_name',NULL);
CALL xtab_set('gender_by_dept','col_from',NULL);
CALL xtab_set('gender_by_dept','op','sum');
CALL xtab_set('gender_by_dept','op_col','salary');
CALL xtab_set('gender_by_dept','from_clause','person 
inner join departments using(dept_id)');
CALL xtab_set('gender_by_dept','where_clause',NULL);
CALL xtab_set('gender_by_dept','wanted_result',NULL);
63
Object Oriented Crosstab (11)
# Exporting crosstab query
CALL xtab_query('gender_by_dept')G
****************** 1. row ********************
query for crosstab:
SELECT gender
, sum( CASE WHEN department = 'pers' THEN salary 
    ELSE NULL END) AS `pers`
, sum( CASE WHEN department = 'sales' THEN salary 
    ELSE NULL END) AS `sales`
, sum( CASE WHEN department = 'dev' THEN salary 
    ELSE NULL END) AS `dev`
, sum(salary) as total
FROM person inner join departments using(dept_id)
GROUP BY gender
64
Object Oriented Crosstab (12)
# Listing crosstabs
CALL xtab_list();
+­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­+
| CROSSTAB           | executable |
+­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­+
| category_by_rating | ok         |
| rating_by_category | ok         |
| location_by_dept   | ok         |
| dept_by_location   | ok         |
| gender_by_location | ok         |
| location_by_gender | ok         |
| dept_by_gender     | ok         |
| gender_by_dept     | ok         |
+­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­+
65
Parting thoughts
●
Pivot tables can be made in
SQL
●
Pivot tables in normal SQL
require external languages
●
With stored routines, there
are various techniques
●
Efficient crosstabs are
feasible with well designed
stored routines
66
THANKS
Question 
time
http://datacharmer.org

More Related Content

Viewers also liked

Italia di gusto - Marco Tonnarelli
Italia di gusto - Marco TonnarelliItalia di gusto - Marco Tonnarelli
Italia di gusto - Marco Tonnarelli
Marco Tonnarelli
 
Module 2 Lesson 1
Module 2 Lesson 1Module 2 Lesson 1
Module 2 Lesson 1claytors
 
Fyltex 2-6x Part 2
Fyltex 2-6x Part 2Fyltex 2-6x Part 2
Fyltex 2-6x Part 2MarcelaLugo
 
Education. There's an app for that...
Education. There's an app for that...Education. There's an app for that...
Education. There's an app for that...
dbsmarketing
 
escuela de comercio y administración por lilibeth nuñez
escuela de comercio y administración por lilibeth nuñezescuela de comercio y administración por lilibeth nuñez
escuela de comercio y administración por lilibeth nuñez
lilibethknc
 
Slayt heal the world
Slayt heal the worldSlayt heal the world
Slayt heal the worldcalkan
 
Novestus kibet
Novestus kibetNovestus kibet
Novestus kibet
Novestus Kibet
 
Zombie apocalypse
Zombie apocalypseZombie apocalypse
Zombie apocalypsebrookstim
 
P pt el alamein
P pt el alameinP pt el alamein
P pt el alameinRiski W
 
Write your own Web Copy - Webinar with Professional Copywriter, Jackie Barrie
Write your own Web Copy - Webinar with Professional Copywriter, Jackie BarrieWrite your own Web Copy - Webinar with Professional Copywriter, Jackie Barrie
Write your own Web Copy - Webinar with Professional Copywriter, Jackie Barrie
Ann Halloran
 
Amator balikcilik
Amator balikcilikAmator balikcilik
Amator balikcilikadex25
 

Viewers also liked (14)

Italia di gusto - Marco Tonnarelli
Italia di gusto - Marco TonnarelliItalia di gusto - Marco Tonnarelli
Italia di gusto - Marco Tonnarelli
 
Module 2 Lesson 1
Module 2 Lesson 1Module 2 Lesson 1
Module 2 Lesson 1
 
Afrika de cot
Afrika de cotAfrika de cot
Afrika de cot
 
Fyltex 2-6x Part 2
Fyltex 2-6x Part 2Fyltex 2-6x Part 2
Fyltex 2-6x Part 2
 
Education. There's an app for that...
Education. There's an app for that...Education. There's an app for that...
Education. There's an app for that...
 
escuela de comercio y administración por lilibeth nuñez
escuela de comercio y administración por lilibeth nuñezescuela de comercio y administración por lilibeth nuñez
escuela de comercio y administración por lilibeth nuñez
 
Group 1 hao_nv
Group 1 hao_nvGroup 1 hao_nv
Group 1 hao_nv
 
Slayt heal the world
Slayt heal the worldSlayt heal the world
Slayt heal the world
 
120519gmka
120519gmka120519gmka
120519gmka
 
Novestus kibet
Novestus kibetNovestus kibet
Novestus kibet
 
Zombie apocalypse
Zombie apocalypseZombie apocalypse
Zombie apocalypse
 
P pt el alamein
P pt el alameinP pt el alamein
P pt el alamein
 
Write your own Web Copy - Webinar with Professional Copywriter, Jackie Barrie
Write your own Web Copy - Webinar with Professional Copywriter, Jackie BarrieWrite your own Web Copy - Webinar with Professional Copywriter, Jackie Barrie
Write your own Web Copy - Webinar with Professional Copywriter, Jackie Barrie
 
Amator balikcilik
Amator balikcilikAmator balikcilik
Amator balikcilik
 

Similar to Pivot tables mysql_5

MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015
Dave Stokes
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
Dave Stokes
 
Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...
Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...
Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...
Citus Data
 
MySQL partitioning performance
MySQL partitioning performanceMySQL partitioning performance
MySQL partitioning performance
Tommy Đột
 
Why PostgreSQL for Analytics Infrastructure (DW)?
Why PostgreSQL for Analytics Infrastructure (DW)?Why PostgreSQL for Analytics Infrastructure (DW)?
Why PostgreSQL for Analytics Infrastructure (DW)?
Huy Nguyen
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
Colin Charles
 
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Ontico
 
MySQL 开发
MySQL 开发MySQL 开发
MySQL 开发
YUCHENG HU
 
Data pipelines from zero to solid
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solid
Lars Albertsson
 
Hadoop Tutorial with @techmilind
Hadoop Tutorial with @techmilindHadoop Tutorial with @techmilind
Hadoop Tutorial with @techmilind
EMC
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
MariaDB plc
 
Discard inport exchange table & tablespace
Discard inport exchange table & tablespaceDiscard inport exchange table & tablespace
Discard inport exchange table & tablespaceMarco Tusa
 
Need for Speed: MySQL Indexing
Need for Speed: MySQL IndexingNeed for Speed: MySQL Indexing
Need for Speed: MySQL Indexing
MYXPLAIN
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Citus Data
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterMariaDB Corporation
 
L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9
Tony Pearson
 
What’s new in MariaDB ColumnStore
What’s new in MariaDB ColumnStoreWhat’s new in MariaDB ColumnStore
What’s new in MariaDB ColumnStore
MariaDB plc
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
FromDual GmbH
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
MariaDB plc
 

Similar to Pivot tables mysql_5 (20)

MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
 
Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...
Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...
Data Modeling, Normalization, and Denormalisation | PostgreSQL Conference Eur...
 
MySQL partitioning performance
MySQL partitioning performanceMySQL partitioning performance
MySQL partitioning performance
 
Why PostgreSQL for Analytics Infrastructure (DW)?
Why PostgreSQL for Analytics Infrastructure (DW)?Why PostgreSQL for Analytics Infrastructure (DW)?
Why PostgreSQL for Analytics Infrastructure (DW)?
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
 
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
 
MySQL 开发
MySQL 开发MySQL 开发
MySQL 开发
 
Data pipelines from zero to solid
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solid
 
Hadoop Tutorial with @techmilind
Hadoop Tutorial with @techmilindHadoop Tutorial with @techmilind
Hadoop Tutorial with @techmilind
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
Fudcon talk.ppt
Fudcon talk.pptFudcon talk.ppt
Fudcon talk.ppt
 
Discard inport exchange table & tablespace
Discard inport exchange table & tablespaceDiscard inport exchange table & tablespace
Discard inport exchange table & tablespace
 
Need for Speed: MySQL Indexing
Need for Speed: MySQL IndexingNeed for Speed: MySQL Indexing
Need for Speed: MySQL Indexing
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
 
L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9
 
What’s new in MariaDB ColumnStore
What’s new in MariaDB ColumnStoreWhat’s new in MariaDB ColumnStore
What’s new in MariaDB ColumnStore
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 

Recently uploaded

Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
alex933524
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
James Polillo
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
theahmadsaood
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 

Recently uploaded (20)

Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 

Pivot tables mysql_5