Olá pessoal, preciso adquirir do banco o horário com maior movimento, alguém consegue ma ajudar? Essas são minhas tabelas:
CREATE TABLE "HR"."TB_CARROS"
( "CAR_ID" NUMBER(6,0),
"CAR_PLACA" VARCHAR2(8 BYTE),
"CAR_MARCA" VARCHAR2(15 BYTE),
"CAR_MODELO" VARCHAR2(15 BYTE),
"CAR_COR" VARCHAR2(20 BYTE),
"CAR_CLI_ID" NUMBER(4,0),
"CAR_TCA_ID" NUMBER(2,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_CLIENTES"
( "CLI_ID" NUMBER(4,0),
"CLI_NOME" VARCHAR2(60 BYTE),
"CLI_CPF" VARCHAR2(15 BYTE),
"CLI_RG" VARCHAR2(12 BYTE),
"CLI_CNH" NUMBER(11,0),
"CLI_DT_NASCIMENTO" DATE,
"CLI_TEL1" VARCHAR2(15 BYTE),
"CLI_TEL2" VARCHAR2(15 BYTE),
"CLI_TEL3" VARCHAR2(15 BYTE),
"CLI_ENDERECO" VARCHAR2(60 BYTE),
"CLI_NUMERO" VARCHAR2(6 BYTE),
"CLI_BAIRRO" VARCHAR2(30 BYTE),
"CLI_CIDADE" VARCHAR2(15 BYTE),
"CLI_ESTADO" VARCHAR2(19 BYTE),
"CLI_PAIS" VARCHAR2(15 BYTE),
"CLI_MENSALISTA" CHAR(1 BYTE),
"CLI_DIA_PAGAMENTO" NUMBER(2,0),
"CLI_EMP_ID" NUMBER(4,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_EMPRESAS"
( "EMP_ID" NUMBER(4,0),
"EMP_NOME_FANTASIA" VARCHAR2(60 BYTE),
"EMP_RAZAO_SOCIAL" VARCHAR2(60 BYTE),
"EMP_CNPJ" VARCHAR2(18 BYTE),
"EMP_CONTATO" VARCHAR2(60 BYTE),
"EMP_EMAIL" VARCHAR2(30 BYTE),
"EMP_DT_CADASTRO" DATE,
"EMP_ENDERECO" VARCHAR2(60 BYTE),
"EMP_NUMERO" VARCHAR2(6 BYTE),
"EMP_BAIRRO" VARCHAR2(30 BYTE),
"EMP_CIDADE" VARCHAR2(15 BYTE),
"EMP_ESTADO" VARCHAR2(19 BYTE),
"EMP_PAIS" VARCHAR2(15 BYTE),
"EMP_TEL1" VARCHAR2(15 BYTE),
"EMP_TEL2" VARCHAR2(15 BYTE),
"EMP_TEL3" VARCHAR2(15 BYTE),
"EMP_QTDE_MAX_CONV" NUMBER(4,0),
"EMP_AUTOR_MENSALISTA" CHAR(1 BYTE),
"EMP_VALOR_DESCONTO" VARCHAR2(15 BYTE)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_ESTACIONAMENTO"
( "EST_ID" NUMBER(3,0),
"EST_NOME_GERENTE" VARCHAR2(60 BYTE),
"EST_ENDERECO" VARCHAR2(60 BYTE),
"EST_NUMERO" VARCHAR2(6 BYTE),
"EST_BAIRRO" VARCHAR2(30 BYTE),
"EST_CIDADE" VARCHAR2(15 BYTE),
"EST_ESTADO" VARCHAR2(19 BYTE),
"EST_PAIS" VARCHAR2(15 BYTE),
"EST_TEL1" VARCHAR2(15 BYTE),
"EST_TEL2" VARCHAR2(15 BYTE),
"EST_TEL3" VARCHAR2(15 BYTE),
"EST_QTDE_VAGAS" NUMBER(4,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_EST_AV"
( "ESA_HORA_ENTRADA" VARCHAR2(8 BYTE) DEFAULT sysdate,
"ESA_HORA_SAIDA" VARCHAR2(8 BYTE),
"ESA_CAR_ID" NUMBER(6,0),
"ESA_VAG_ID" NUMBER(4,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_PRECOS"
( "PRE_ID" NUMBER(12,0),
"PRE_PRIMEIRA_HORA" NUMBER(2,0),
"PRE_HORAS_RESTANTES" NUMBER(2,0),
"PRE_12_HORAS" NUMBER(3,0),
"PRE_24_HORAS" NUMBER(3,0),
"PRE_EST_ID" NUMBER(3,0),
"PRE_TCA_ID" NUMBER(2,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_TIPO_CARRO"
( "TCA_ID" NUMBER(2,0),
"TCA_TIPO" VARCHAR2(15 BYTE)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
CREATE TABLE "HR"."TB_VAGAS"
( "VAG_ID" NUMBER(4,0),
"VAG_LOCAL" VARCHAR2(8 BYTE),
"VAG_ANDAR" NUMBER(4,0),
"VAG_EST_ID" NUMBER(3,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;