Santiago Moresi

Generation

text to sql syntaxFri, 14 Jul 2023

Del total de clientes que realizaron compras en 2020. Qué porcentaje no había realizado compras en 2019. Tenido la tabla de cliente, compra

select count(*) as new_clients from customers where id_customer in (select id_customer from purchases where year(date_purchase) = 2020 and id_customer not in (select id_customer from purchases where year(date_purchase) = 2019));

Want to kickstart your project?Use the new AI Studio to create your code