/* SQL Fundamentals SELECT ... FROM */ /* Show teams */ select teamid, team_name from teams; /* List students */ select stdid, stdfname, stdlname from students; /* List all columns in teams */ select * from teams; /* List departments in AdventureWorks */ Select DepartmentID, Name, GroupName From AdventureWorks2008.HumanResources.Department; /* List shift data AdventureWorks */ Select ShiftID, Name, StartTime, EndTime From AdventureWorks2008.HumanResources.Shift; /* Count students */ select count(*) from students; /* Count employee records in AW */ select count(*) from AdventureWorks2008.HumanResources.Employee; /*THIS IS WHERE THE SCRIPTS FOR SELECT FROM WHERE BEGINS */ /* Show students on the SYSDES team. */ select std_teamID, stdfname, stdlname from students where std_teamID = 'SYSDES'; /* Show students on the DIGSOL team. No records are found. */ select std_teamID, stdfname, stdlname from students where std_teamID = 'DIGSOL'; /* Show all student data. Show that no one is on the DIGSOL team.*/ select * from students; /* Show students not majoring in information systems. */ select std_teamid, stdfname, stdlname from students where std_teamID <> 'ISYS'; /* Count how many Design Engineers there are at AW. */ select count(*) from AdventureWorks2008.HumanResources.Employee where jobtitle = 'Design Engineer'; /* Show the departments in the Quality Assurance group. */ Select DepartmentID, Name, GroupName From AdventureWorks2008.HumanResources.Department where GroupName = 'Quality Assurance';