CSE 154 Query Tester
Database:
menu
world
simpsons
imdb_small
games
other:
Username:
MySQL password:
PHP code for a PDO connection to this database:
$db = new PDO("mysql:dbname=
;host=cubist.cs.washington.edu;charset=utf8", "
traveler
", "
packmybags
");
SQL query:
Submit Query
154_world:
countries
Other columns:
region
,
surface_area
,
life_expectancy
,
gnp_old
,
local_name
,
government_form
,
capital
,
code2
code
name
continent
independence_year
population
gnp
head_of_state
...
AFG
Afghanistan
Asia
1919
22720000
5976.0
Mohammad Omar
...
NLD
Netherlands
Europe
1581
15864000
371362.0
Beatrix
...
...
languages
country_code
language
official
percentage
AFG
Pashto
T
52.4
NLD
Dutch
T
95.6
...
cities
id
name
country_code
district
population
3793
New York
USA
New York
8008278
1
Los Angeles
USA
California
3694820
...
154_simpsons:
students
id
name
email
password
123
Bart
bart@fox.com
bartman
456
Milhouse
milhouse@fox.com
fallout
...
grades
student_id
course_id
grade
123
10001
B-
404
10002
B
...
courses
id
name
teacher_id
10001
Computer Science 142
1234
10002
Computer Science 143
5678
...
teachers
id
name
1234
Krabappel
5678
Hoover
...
154_imdb_small and imdb:
movies
id
name
year
rank
112290
Fight Club
1999
8.5
209658
Meet the Parents
2000
7
210511
Memento
2000
8.7
...
roles
actor_id
movie_id
role
433259
313398
Capt. James T. Kirk
433259
407323
Sgt. T.J. Hooker
797926
342189
Herself
...
actors
id
first_name
last_name
gender
film_count
433259
William
Shatner
M
162
797926
Britney
Spears
F
65
831289
Sigourney
Weaver
F
72
...
movies_directors
director_id
movie_id
24758
112290
66965
209658
72723
313398
...
directors
id
first_name
last_name
24758
David
Fincher
66965
Jay
Roach
72723
William
Shatner
...
movies_genres
movie_id
genre
209658
Comedy
313398
Action
313398
Sci-Fi
...
154_games:
Games
id
name
platform
release_year
genre
publisher
developer
rating
1
Pokemon Red/Blue
GB
1996
Role-Playing
Nintendo
NULL
NULL
2
Spyro Reignited Trilogy
PS4
2018
Platform
Activision
Toys for Bob
E
...
Sales
id
na_sales
eu_sales
japan_sales
other_sales
global_sales
2
29.08
3.58
6.81
0.77
40.24
3
15.68
12.76
3.79
3.29
35.52
...
154_menu:
menu
id
name
category
subcategory
price
cost
1
Brewed Coffee (Black)
Drinks
Coffee
1.25
0.65
2
Brewed Coffee (With Cream and Sugar)
Drinks
Coffee
2.00
1.05
...