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 |
|
arsenala
Starting Member
2 Posts |
Posted - 2011-05-24 : 04:25:44
|
| this is how my BD looks likeEmployeesEmployee_idFirst_nameLast_nameHire_dateJob_idSalaryCommission_petDepartment_idManager_idDepartmentsDepartment_idDepartment_nameLocation_idLocationsLocation_idLoc_name1) Get the departments, names of departments and names of cities where they are2) Show the name, salary and calculate the increase in annual salary by 100 for all employees, show new column named new_annualsalary3) Display the name and post code of all officers of Department 20, formed as a izrechnie, show the new name of the column employee_details4) Show the name, post code and name of the department of all employees who make salary greater than 10,0005) Show the name and salary of employees of the table Employee, on which the salary is between 2500 and 35006) Display the family of any employee whose last name begins with the letter "Zhma"7) Display names of all employees subject to the King8) Show the name, department and position of all employees whose salary is not 2500, 3500, 45009) Increase the salary of all employees in department 10 with 100 and save it in the database10) Show the name and salary of a fellow officer with first name John11) get the departments, the maximum and minimum date of entry in each department12) Show the three employees with the highest salaries in the company |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2011-05-24 : 05:08:59
|
| So, what is your question? What have you tried? |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-05-24 : 05:14:23
|
| We don't do your homework for you. Show what you've done, explain where you're stuck, someone will offer suggestions.--Gail ShawSQL Server MVP |
 |
|
|
arsenala
Starting Member
2 Posts |
Posted - 2011-05-24 : 07:14:41
|
| ok, on number 12)is it right?select top 3 first_name, last_namefrom employeeorder by salary desc |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2011-05-24 : 08:43:05
|
| yes, that is correct, but if you run it, you should have been able to gauge that anyway. |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-05-24 : 08:44:16
|
| And it doesn't account for ties in salary.JimEveryday I learn something that somebody else already knew |
 |
|
|
|
|
|
|
|