BIS345Lab2EmilioPadulese

BIS345Lab2EmilioPadulese - Count ( ProductID ) as Products...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Emilio Padulese BIS345 Lab2 Question#1 SELECT TitleOfCourtesy + ' ' + Left ( FirstName , 1 ) + ' . ' + LastName as FullName , Title , HireDate FROM Employees ORDER BY FullName ; Question#2 SELECT TitleOfCourtesy + ' ' + Left ( FirstName , 1 ) + ' . ' + LastName as FullName , DATEPART ( yy , HireDate ) as YEAR FROM Employees ORDER BY FullName ;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Question#3 SELECT Country , COUNT ( CustomerID ) as TOTAL FROM Customers GROUP BY country ORDER BY Total DESC ;
Background image of page 2
Question#4 SELECT Count ( ProductID ) as Products , SUM ( unitsinstock ) as Qty FROM Products WHERE Discontinued = 1 ; SELECT
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Count ( ProductID ) as Products , SUM ( unitsinstock ) as Qty FROM Products WHERE Discontinued = 'True' ; Question#5 ELECT AVG ( DateDiff ( YY , Birthdate , GetDate ())) As "Avg Age" , MAX ( DateDiff ( YY , BirthDate , GetDate ())) AS "Oldest" , MIN ( DateDiff ( YY , BirthDate , GetDate ())) AS "Youngest" from Employees ; Question#6 Question#7 Question#8 Question#9 Question#10...
View Full Document

Page1 / 12

BIS345Lab2EmilioPadulese - Count ( ProductID ) as Products...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online