

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


Ejercicios: select Customers.CustomerID, Customers.CompanyName, Customers.Country, Customers.Fax from Customers where fax is null
select Customers.CustomerID, Customers.CompanyName, Customers.Country, Customers.Fax from Customers where country = 'brazil' or country = 'france'
select Customers.CustomerID, Customers.CompanyName, Customers.ContactName, Customers.Country, Orders.OrderID, Orders.OrderDate from Customers inner join Orders on Customers.CustomerID = Orders.CustomerID where (((Customers.Country)='france' or (Customers.Country)='brazil') and ((Orders.orderid)< 10262 )) order by Orders.OrderID
select Employees.EmployeeID, Employees.LastName, Employees.FirstName, Orders.OrderID, Orders.OrderDate from Employees inner join Orders on Employees.EmployeeID = Orders.EmployeeID where Orders.OrderID < 10270 order by Orders.OrderID
select Categories.CategoryID, Categories.CategoryName, Products.ProductID, Products.ProductName, Products.UnitPrice,Products.UnitsInStock from Categories inner join Products on Categories.CategoryID = Products.CategoryID where Categories.CategoryName = 'Condiments' --Otra forma select Categories.CategoryID, Categories.CategoryName, Products.ProductID, Products.ProductName, Products.UnitPrice,Products.UnitsInStock from Categories inner join Products on Categories.CategoryID = Products.CategoryID where Categories.CategoryID = 2
select EmployeeID, LastName, Title, BirthDate, floor(datediff(day, birthdate, getdate()) / 365 ) as edad from Employees
select EmployeeID, LastName, Title, HireDate, floor(datediff(day, HireDate, getdate()) / 365 ) as Tiemp_trabajo from Employees
select Categories.CategoryID, Categories.CategoryName, Products.ProductID, Products.ProductName, Products.QuantityPerUnit, Products.UnitPrice, [Order Details].OrderID, [Order Details].ProductID from Categories inner join (Products inner join [Order Details] on Products.ProductID = [Order Details].ProductID) on Categories.CategoryID = Products.CategoryID where [Order Details].OrderID = '10248'