DROP TABLE IF EXISTS listing;
CREATE TABLE scores (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
name CHAR(30) NOT NULL,
score INT NOT NULL,
INDEX property (score, name)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO scores (name, score) VALUES("Taro Yamada", 29);
INSERT INTO scores (name, score) VALUES("Taro Yamada", -12);
INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27);
INSERT INTO scores (name, score) VALUES("Taro Yamada", 10);
SELECT * FROM scores;
id	name	score
1	Taro Yamada	29
2	Taro Yamada	-12
3	Jiro Yamada	27
4	Taro Yamada	10
SELECT * FROM scores WHERE score = 29;
id	name	score
1	Taro Yamada	29
SELECT * FROM scores WHERE score = 29 AND name = "Taro Yamada";
id	name	score
1	Taro Yamada	29
SELECT * FROM scores WHERE (score >= -12 AND score < 29) AND name = "Taro Yamada";
id	name	score
2	Taro Yamada	-12
4	Taro Yamada	10
DROP TABLE scores;
