1. Whit check para activar las restricciones o chequeo para que cumpla las restricciones
Whit nocheck tambien se utiliza para habilitar y deshabilitar llaves foráneas
Para deshabilitar
Alter table emp
Nocheck
constraint llave_foranea
1.-select OrderID as pedido,
Sum [UnitPrice * Quanity] as importe,
From [order details]
Group by OrderID
Order by importe desc
2.- select TOP 10 OrderID as pedido,
Sum [UnitPrice * Quanity] as importe,
From [order details]
Group by OrderID
Order by importe desc
3.- select TOP 10 whit ties OrderID as pedido,
Sum [UnitPrice * Quanity] as importe,
From [order details]
Group by OrderID
Order by importe desc
4.-select a.categoryID, sum(b.quanty) as cantidad
2. 5.-select ordered, sum(quantity) as cantidad total
Having (sum(quantity))>250
Order by [cantidad total] desc
6.-selct productId as[clave product],
ordered as[numero de orden]
sum(quantity)
from[order details]
group by productId, ordered with rollup
order by productID, ordered
7.-