--Simple Selects USE Pubs --All rows & columns SELECT * FROM Titles --All rows & some columns SELECT Title_id, Title, Price, Ytd_sales FROM Titles --Some rows & some columns SELECT Title_id, Title, Price, Ytd_sales FROM Titles WHERE Price > 10 --Some rows & some columns ordered SELECT Title_id, Title, Price, Ytd_sales FROM Titles WHERE Price > 5 ORDER BY Price DESC, Title --The average price by type of books priced more than 10 SELECT Type, AVG(Price) AS AvgPrice FROM Titles WHERE Price > 10 GROUP BY Type ORDER BY AvgPrice DESC DROP TABLE TypeAvgPrice --Copy to new table, that does not yet exist SELECT Type, AVG(Price) AS AvgPrice INTO TypeAvgPrice FROM Titles WHERE Price > 10 GROUP BY Type ORDER BY AvgPrice DESC SELECT * FROM TypeAvgPrice