Explorar el Código

Started final report

mpierse hace 6 años
padre
commit
dd717478df
Se han modificado 1 ficheros con 11 adiciones y 3 borrados
  1. 11
    3
      Queries

+ 11
- 3
Queries Ver fichero

@@ -64,8 +64,16 @@ GROUP BY pt.pokemon_id
64 64
 HAVING COUNT(*)=1
65 65
     ) AS once;
66 66
 
67
-SELECT pokemons.name, trainers.trainername, pokemon_trainer.pokelevel, , pokemons.secondary_type
68
-FROM pokemons
69
-JOIN
67
+/*Final Report*/
68
+SELECT p.name as Name, tr.trainername as Trainer, pt.pokelevel as Level, t.name AS PrimaryType, t.name AS SecondaryType
69
+FROM types t
70
+JOIN pokemons p
71
+ON t.id=p.primary_type
72
+JOIN pokemons s
73
+ON t.id=s.secondary_type
74
+JOIN pokemon_trainer pt
75
+ON p.id=pt.pokemon_id
76
+JOIN trainers tr
77
+ON pt.trainerID=tr.trainerID;
70 78
 
71 79