Sql server
Hola buen día me urge aver si me pueden ayudar. Tengo dos tablas con la siguiente estructura
create table ingredientes
(
ingrediente char(20),
precio float,
toneladas int,
total float,
clasificacion char(20)
)
create table forrajes
(
ingrediente char(20),
precio float,
toneladas int,
total float,
clasificacion char(20)
)
Necesito hacer una consulta con el total de cada uno según su clasificaion:
por ejemplo select sum(total) as 'total clasificaicon' from forrajes where clasigicacion = 'a'
select sum(total) as 'total clasificaicon' from ingredientees where clasigicacion = 'a'
Y savar la suma de ambos. Totales. Como le hago para que este en una sola consulta gracias...
URGE
create table ingredientes
(
ingrediente char(20),
precio float,
toneladas int,
total float,
clasificacion char(20)
)
create table forrajes
(
ingrediente char(20),
precio float,
toneladas int,
total float,
clasificacion char(20)
)
Necesito hacer una consulta con el total de cada uno según su clasificaion:
por ejemplo select sum(total) as 'total clasificaicon' from forrajes where clasigicacion = 'a'
select sum(total) as 'total clasificaicon' from ingredientees where clasigicacion = 'a'
Y savar la suma de ambos. Totales. Como le hago para que este en una sola consulta gracias...
URGE
1 respuesta
Respuesta de rume83
1