Hello, I would like to know how to query the Oracle database to know: What is the average number of guests per day of any given week. Here's the script for the bank:
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);