12.07.2015 Views

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GroupingThese two queries retrieve the same information,but the way the information is returned <strong>to</strong> us willbe different:SELECT Cus<strong>to</strong>merID, ShipVia, Count (OrderID)AS OrderCount FROM OrdersGROUP BY ShipVia, Cus<strong>to</strong>merIDSELECT Cus<strong>to</strong>merID, ShipVia, Count (OrderID)AS OrderCount FROM OrdersGROUP BY Cus<strong>to</strong>merID, ShipVia

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!