drop table if exists scores;
set names utf8mb4;
create table scores (
given_name varchar(30) not null,
family_name varchar(30) not null,
score int not null,
primary key (given_name, family_name, score)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
insert into scores values("Taro", "Yamada", 29);
insert into scores values("Taro", "Yamada", -12);
insert into scores values("Jiro", "Yamada", 27);
insert into scores values("Taro", "Yamada", 10);
select * from scores;
given_name	family_name	score
Jiro	Yamada	27
Taro	Yamada	-12
Taro	Yamada	10
Taro	Yamada	29
select * from scores where given_name = "Taro" and family_name = "Yamada";
given_name	family_name	score
Taro	Yamada	-12
Taro	Yamada	10
Taro	Yamada	29
select * from scores where given_name = "Taro" and family_name = "Yamada" and score = 29;
given_name	family_name	score
Taro	Yamada	29
select * from scores where given_name = "Taro" and family_name = "Yamada" and (score >= -12 and score < 29);
given_name	family_name	score
Taro	Yamada	-12
Taro	Yamada	10
drop table scores;
