Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
markie88
Starting Member
3 Posts |
Posted - 2012-01-12 : 10:08:45
|
| Hi guys, I am trying to complete some basic queries based on some tables in an excels heet. What I learned in school was mySQL, which I am fairly comfortable with; however, I have no way to test these queries I have written. My laptop is running windows 7. The tables are as follows:tblEMP:employeeID name startDate Title1 Bob 10/1/2009 Labor Guy2 Tom 1/1/2010 Warehouse Assistant3 Larry 2/25/2010 Warehouse Assistant4 Tina 4/1/2010 SupervisortblHours:employeeID date hours1 03-May-10 81 04-May-10 81 28-May-10 41 01-Jun-10 81 02-Jun-10 81 03-Jun-10 82 18-May-10 82 31-May-10 82 01-Jun-10 02 07-Jun-10 82 17-Jun-10 83 28-May-10 83 31-May-10 83 04-Jun-10 83 07-Jun-10 84 03-May-10 84 19-May-10 04 02-Jun-10 84 03-Jun-10 8tblRate:employeeID rate1 $7.502 $12.003 $12.004 $22.00Here are the 5 queries:1 How many hours and which days did Bob work in the month of June? 2 How many total hours did each employee work in the month of May? 3 What was the total labor spend on warehouse assistants in May? 4 On average, who works the longest days? 5 How many total days did each employee work in May? In June? Compare both of these numbers in 1 query. |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
markie88
Starting Member
3 Posts |
Posted - 2012-01-12 : 10:39:59
|
| Yes, at work I have Microsoft SQL Server 2008, but I'm not too familiar with it (as far as setting up those tables as a local database on my machine). It keeps asking to connect; I don't want to connect to any of the work servers! |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2012-01-12 : 10:49:34
|
| SQL is a server product, you need to connect to a server in order to do anything. You can install SQL Express on your home PC (not at work unless OK'd by the IT dept) and use that--Gail ShawSQL Server MVP |
 |
|
|
|
|
|