Santiago Moresi

Generation

text to sql syntaxFri, 14 Jul 2023

Del total de clientes. Qué porcentaje realizó compras sólo por el canal online entre 2019 y 2020

SELECT (COUNT(*) * 100) FROM customers WHERE customer_id IN (SELECT customer_id FROM transactions WHERE transaction_channel = 'ONLINE' AND transaction_date > '2019-01-01') AND customer_id NOT IN (SELECT customer_id FROM transactions WHERE transaction_channel <> 'ONLINE' AND transaction_date > '2019-01-01');

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