This document contains SQL queries that:
1) Select data from the Employees, Products, and Categories tables to show product names, prices, and categories.
2) Join the Products and Categories tables to filter for specific category IDs.
3) Join the Customers, Orders, Employees, and Suppliers tables to filter for specific customer, employee, and supplier fields.
4) Filter order details to show products above a certain price.
5) Filter orders that were sent to Mexico or Germany.
This document contains SQL queries that:
1) Select data from the Employees, Products, and Categories tables to show product names, prices, and categories.
2) Join the Products and Categories tables to filter for specific category IDs.
3) Join the Customers, Orders, Employees, and Suppliers tables to filter for specific customer, employee, and supplier fields.
4) Filter order details to show products above a certain price.
5) Filter orders that were sent to Mexico or Germany.
This document contains SQL queries that:
1) Select data from the Employees, Products, and Categories tables to show product names, prices, and categories.
2) Join the Products and Categories tables to filter for specific category IDs.
3) Join the Customers, Orders, Employees, and Suppliers tables to filter for specific customer, employee, and supplier fields.
4) Filter order details to show products above a certain price.
5) Filter orders that were sent to Mexico or Germany.
select LastName,FirstName,TitleOfCourtesy from Employees where TitleOfCourtesy='Mrs.'
select * from Products
select ProductID, ProductName, UnitPrice from Products where UnitPrice >=10 and UnitPrice <= 50
select * from Products
select * from Categories
select ProductName, UnitPrice, CategoryName
from Products inner join Categories on Products.CategoryID=Categories.CategoryID
----mostrar los ProductName, UnitPrice, CategoryName y que la categoria sea carnes
select ProductName, UnitPrice, CategoryName from Products inner join Categories on Products.CategoryID=Categories.CategoryID where Categories.CategoryID=6
----mostrar los ProductName, UnitPrice, CategoryName y que la categoria sea lacteos
select ProductName, UnitPrice, CategoryName from Products inner join Categories on Products.CategoryID=Categories.CategoryID where Categories.CategoryID=4
select CompanyName, Country, OrderID
from customers inner join Orders on customers.CustomerID=Orders.CustomerID where customers.CustomerID='ANTON'
--- Pedido con empleados (Nancy Davolio)
SELECT * FROM Employees SELECT * FROM Orders
select FirstName, Country, Title, OrderID
from Employees inner join Orders on Employees.EmployeeID=Orders.EmployeeID where Employees.LastName='Davolio'