interview like a pro: having: filtering aggregated results

14

Upload: joes2pros

Post on 17-Aug-2015

47 views

Category:

Technology


1 download

TRANSCRIPT

Lets get a count of the LocationID and how many employees work there.

Lets get a count of the LocationID and how many employees work there.

Locations that have more then 2 employees

Locations that have more then 2 employees

How many people > 2 work in these locations?

How many people work in these locations?

Aggregate Results with HAVING

Aggregate Results with HAVING

Aggregate Results with HAVING

Aggregate Results with DISTINCT

Using both DISTINCT and GROUP By

Full Class List from the Academy

Visit http://www.joes2pros.com/joes2pros/Course/How_to_Interview_like_a_Pro to watch a FREE CLASS1. SQL Code: Must Know!2. Cross Joins: Real World Examples3. Complex Relationships: Many To Many Relationship4. HAVING: Filtering Aggregated Results5. Over Clause: Power Of Over Clause With Example6. TOP N Queries: Power Of TOP N7. Ranking Function: Learn And Master8. Ranking Function: Complex TSQL Using Ranking Function9. SET Operators: Learn By Example10.INTERECT & EXCEPT: Table Magic11.SELF JOINS: Work With Hierarchical Data12.Correlated Sub-Queries: How To?13.MERGE Clause: Insert/Update With One Statement.

• Visit Joes2Pros.com for video lessons with over 600+ classes, quizzes, and labs.

• Self-Paced Learning• Rewards & Certificates• Anywhere, Anytime, Any

Device.• Limitless Learning• Access to Experts• Social Collaboration