0
Hello, I would like to know how to make a query (Query) in the Oracle database to know: What is the average number of guests per day of any week. Below is the bank script:
CREATE TABLE APP.HOSPEDAGENS (
hsp_id number(6),
hsp_checkin Date,
hsp_preco_total number(8,2),
hsp_checkout Date,
hsp_cli_id number(6),
hsp_qua_id number(6),
CONSTRAINT pk_hsp_id PRIMARY KEY(hsp_id) );
ALTER TABLE APP.HOSPEDAGENS ADD FOREIGN KEY (hsp_cli_id) REFERENCES APP.CLIENTES (cli_id);
ALTER TABLE APP.HOSPEDAGENS ADD FOREIGN KEY (hsp_qua_id) REFERENCES APP.QUARTOS (qua_id);
Example in sqlfiddle: http://sqlfiddle.com/#! 4/ff2030/1/0
– Confundir