Lazy loaded image
Bases de Datos Relacionales
🟣Ejercicios: Funciones de Agregación
Palabras 451Tiempo de lectura 2 min
Jan 9, 2025
Jan 11, 2025
type
status
slug
summary
tags
category
icon
password

★ღ Ejercicio 1 ★ღ✰

notion image

★ღ Problema 1 ★ღ

Contar el número total de animales por especie de la tabla “Animales”.

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 2 ★ღ

Calcular la edad promedio de los animales por especie.

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 3 ★ღ

Encontrar el animal más viejo y el animal más joven.

★ Query ★

notion image

★ Output ★

notion image

★ღ Ejercicio 2 ★ღ✰

notion image

★ღ Problema 1 ★ღ

¿Cuál es el ingreso total de las ventas del producto A?

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 2 ★ღ

¿Cuántas ventas se realizaron para cada producto?

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 3 ★ღ

¿Cuál es el ingreso total y la cantidad total de productos vendidos?

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 4 ★ღ

¿Cuál es el producto que generó el mayor ingreso total?

★ Query ★

notion image

★ Output ★

notion image

★ღ Ejercicio 3 ★ღ✰

notion image

★ღ Problema 1 ★ღ

¿Cuál es el salario promedio de los empleados en el departamento de Ventas?

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 2 ★ღ

¿Cuántos empleados hay en cada departamento?

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 3 ★ღ

¿Cuál es el salario total pagado a todos los empleados?

★ Query ★

notion image

★ Output ★

notion image

★ღ Problema 4 ★ღ

¿Cuál es el empleado con el salario más alto?

★ Query ★

notion image

★ Output ★

notion image
 
上一篇
SQL Básico
下一篇
¿Qué es la Nube?