Commit 6153b240 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

merge

parents 48e03169 8f046a01
...@@ -63,7 +63,7 @@ nothing 2 ...@@ -63,7 +63,7 @@ nothing 2
one 1 one 1
two 1 two 1
drop table t1; drop table t1;
drop table if exists t1; drop table if exists t;
create table t1 (row int not null, col int not null, val varchar(255) not null); create table t1 (row int not null, col int not null, val varchar(255) not null);
insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small');
select max(case col when 1 then val else null end) as color from t1 group by row; select max(case col when 1 then val else null end) as color from t1 group by row;
...@@ -71,4 +71,4 @@ color ...@@ -71,4 +71,4 @@ color
orange orange
yellow yellow
green green
drop table if exists t1; drop table if exists t;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment