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(channelName) * 100 / (SELECT COUNT(*) FROM orders)) AS percent FROM orders WHERE channelName='online' and YEAR(orderDate) BETWEEN 2019 AND 2020

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