SELECT P.name as "Pokemon Name",
       TR.trainername as "Trainer Name",
       PT.pokelevel as "Level",
       T.name as "Primary Type",
       T1.name as "Secondary Type"
FROM pokemon.pokemons P
JOIN pokemon.pokemon_trainer PT
JOIN pokemon.trainers TR
JOIN pokemon.types T
JOIN pokemon.types T1
ON PT.trainerID = TR.trainerID
     and P.id = PT.pokemon_id
     and T.id = P.primary_type
     and T1.id = P.secondary_type
ORDER BY pokelevel DESC;


