Abaixo está uma instrução que descreve uma tarefa de geração de SQL, combinada com uma entrada que fornece mais contexto sobre os esquemas de tabela disponíveis. Escreva o código SQL que responda adequadamente à solicitação
 ###Instrução: Qual é a mudança na demanda e preço da água para cada cidade ao longo do tempo?
 ###Tabelas: 
CREATE TABLE if not exists water_demand (id INT PRIMARY KEY, city VARCHAR(50), water_demand FLOAT, usage_date DATE); CREATE TABLE if not exists water_price (id INT PRIMARY KEY, city VARCHAR(50), price FLOAT, usage_date DATE); CREATE VIEW if not exists water_demand_price AS SELECT wd.city, wd.water_demand, wp.price FROM water_demand wd JOIN water_price wp ON wd.city = wp.city AND wd.usage_date = wp.usage_date;
SELECT city, usage_date, LAG(water_demand) OVER (PARTITION BY city ORDER BY usage_date) as prev_water_demand, water_demand, LAG(price) OVER (PARTITION BY city ORDER BY usage_date) as prev_price, price FROM water_demand_price ORDER BY city, usage_date;