Santiago Moresi

Generation

text to sql syntaxFri, 14 Jul 2023

Necesito saber el porcentaje de compra en el canal 'online' entre '2019' y '2020'

SELECT COUNT(*) * 100.0 / (SELECT COUNT(*) FROM customers WHERE channel='online' AND YEAR(customer_since) BETWEEN 2019 AND 2020) as percentage FROM customers WHERE channel='online' AND YEAR(customer_since) BETWEEN 2019 AND 2020

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