Santiago Moresi

Generation

text to sql syntaxFri, 14 Jul 2023

Necesito saber de total de clientes que porcentaje compro solo por el canal 'online' entre los años '2019' y '2020'

SELECT COUNT(*), (SELECT COUNT(*) FROM customers WHERE channel='online' AND year BETWEEN 2019 and 2020)* 100 / COUNT(*) as porcentaje FROM customers

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