/* @BD_Vuelta_showData.sql */
SET PAGESIZE 5000
SET LINESIZE 132

column idEtapa       format 9999
column ordenMeta     format 9999
column Dorsal        format 9999
column tiempo        format A10

SELECT idEtapa, ordenMeta, Dorsal, to_char(Tiempo, '  hh24:mi:ss') "   tiempo"
         FROM Llegada    ORDER BY idEtapa, ordenMeta;
SELECT * FROM Sprint     ORDER BY idEtapa, idHito, ordenPaso;
SELECT * FROM Coronar    ORDER BY idEtapa, idHito, ordenPaso;
SELECT * FROM Hito       ORDER BY idEtapa, idHito;
SELECT * FROM Corredor   ORDER BY dorsal;
SELECT * FROM Etapa      ORDER BY idEtapa;
SELECT * FROM Puerto     ORDER BY idPuerto;
SELECT * FROM Patrocinio ORDER BY idEquipo;
SELECT * FROM Equipo     ORDER BY idEquipo;
SELECT * FROM Director   ORDER BY acr_Dir;

SELECT count(*) "# Llegada"    FROM Llegada;
SELECT count(*) "# Sprint"     FROM Sprint;
SELECT count(*) "# Coronar"    FROM Coronar;
SELECT count(*) "# Hito"       FROM Hito;
SELECT count(*) "# Corredor"   FROM Corredor;
SELECT count(*) "# Etapa"      FROM Etapa;
SELECT count(*) "# Puerto"     FROM Puerto;
SELECT count(*) "# Patrocinio" FROM Patrocinio;
SELECT count(*) "# Equipo"     FROM Equipo;
SELECT count(*) "# Director"   FROM Director;
