Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
EN EL VALLE DE SULA
ASIGNATURA:
BASES DE DATOS II
TRABAJO:
SECCION:
1700
CATEDRATICO:
MELVIN RAMIREZ
ALUMNO:
DAVID GUERRA
CUENTA:
20112005701
--7
select Prod97.año, Prod97.ProductID, Prod100.ProductID, Prod100.ProductName
from (select ProductID, ProductName, UnitPrice from Products
where UnitPrice > 100) as Prod100
inner join (select distinct year(OrderDate) as año, ProductID
from Orders o inner join [Order Details] od on o.OrderID = od.OrderID
where year(o.OrderDate) = 1997) as Prod97
on Prod100.ProductID = Prod97.ProductID
----------------------------------------------------------------------
--8
--------------------------------------------------------------------------
--9
Una subconsulta que busque la cantidad de órdenes de un cliente especifico