ソースを参照

added files relevent to lab

miscbits 6 年 前
コミット
83388b05a9
共有2 個のファイルを変更した50 個の追加0 個の削除を含む
  1. 50
    0
      README.md
  2. バイナリ
      pokemon_sql.zip

+ 50
- 0
README.md ファイルの表示

@@ -0,0 +1,50 @@
1
+# MySQL Pokemon Report Queries
2
+
3
+### Goals
4
+* Become proficient selecting data out of a mysql database
5
+* Become comfortable performing a SQL join
6
+* Be able to format SQL output as a readable report
7
+
8
+## Instructions
9
+
10
+### Part 1: Importing data
11
+Directions:
12
+
13
+* In intellij, [connect to your local mysql instance](https://www.jetbrains.com/help/idea/connecting-to-a-database.html#mysql)
14
+* Create your pokemon schema
15
+* Unpack the pokemon_sql.zip files
16
+* One by one execute these files making sure to check your pokemon schema
17
+
18
+From here you should have all the pokemon data in your mysql schema. Feel free to explore the data and perform a few select statements to see what the data looks like.
19
+
20
+### Part 2: Simple Selects and Counts
21
+
22
+Directions: Write a sql query or sql queries that can answer the following questions
23
+
24
+* What are all the types of pokemon that a pokemon can have?
25
+* What is the name of the pokemon with id 45?
26
+* How many pokemon are there?
27
+* How many types are there?
28
+* How many pokemon have a secondary type?
29
+
30
+### Part 3: Joins and Groups
31
+Directions: Write a sql query or sql queries that can answer the following questions
32
+
33
+
34
+* What is each pokemon's primary type?
35
+* What is Rufflet's secondary type?
36
+* What are the names of the pokemon that belong to the trainer with trainerID 303?
37
+* How many pokemon have a secondary type `Poison`
38
+* What are all the primary types and how many pokemon have that type?
39
+* How many pokemon at level 100 does each trainer with at least one level 100 pokemone have? (Hint: your query should not display a trainer
40
+* How many pokemon only belong to one trainer and no other?
41
+
42
+### Part 4: Final Report
43
+
44
+Directions: Write a query that returns the following collumns:
45
+
46
+| Pokemon Name | Trainer Name | Level | Primary Type | Secondary Type |
47
+|:------------:|:------------:|:-----:|:------------:|:--------------:|
48
+| Pokemon's name| Trainer's name| Current Level| Primary Type Name| Secondary Type Name|
49
+
50
+Order the data by finding out which trainer has the strongest pokemon so that this will act as a ranking of strongest to weakest trainer. You may interpret strongest in whatever way you want, but you will have to explain your decision.

バイナリ
pokemon_sql.zip ファイルの表示