Volver
Ctrl+Space
◑
Copiar
Descargar
Restaurar
Ejecutar
Ctrl+Enter
-- Ejemplo 2: SUM, AVG, MIN, MAX -- ================================ -- Total de ventas (suma de todas las órdenes) SELECT COUNT(*) AS total_ordenes, ROUND(SUM(total), 2) AS ventas_totales, ROUND(AVG(total), 2) AS ticket_promedio, ROUND(MIN(total), 2) AS orden_minima, ROUND(MAX(total), 2) AS orden_maxima FROM ordenes;
RESULTADO
Escribí un query SQL y hacé clic en
Ejecutar
o presioná
Ctrl
+
Enter