This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT Name, ProductNumber, ListPrice AS Price | |
| FROM Production.Product | |
| ORDER BY Name ASC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT Lastname, | |
| Firstname | |
| INTO Persons_backup | |
| FROM Persons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT e.employee_id, | |
| e.last_name, | |
| e.department_id | |
| FROM employees e, departments d | |
| WHERE e.department_id = d.department_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT p.Name, sod.SalesOrderID | |
| FROM Production.Product AS p | |
| LEFT OUTER JOIN Sales.SalesOrderDetail AS sod | |
| ON p.ProductID = sod.ProductID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT e.employee_id, | |
| d.location_id | |
| FROM employees e,departments d | |
| WHERE e.department_id = d.department_id AND | |
| e.last_name = 'Matos'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT Subject, Semester, Count(*) | |
| FROM [Subject_Selection] | |
| GROUP BY Subject,Semester |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT Employees.LastName, COUNT(Orders.OrderID) AS NumberOfOrders FROM (Orders | |
| INNER JOIN Employees | |
| ON Orders.EmployeeID=Employees.EmployeeID) | |
| GROUP BY LastName | |
| HAVING COUNT(Orders.OrderID) > 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * FROM Customers | |
| ORDER BY Country,CustomerName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT SUM (Sales) FROM Store_Information | |
| WHERE Store_Name IN | |
| ( | |
| SELECT Store_Name FROM Geography | |
| WHERE Region_Name = 'West' | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO dbo.Points (PointValue) VALUES (CONVERT(Point, '3,4')); |
OlderNewer