SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 please can someone help me execute this query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

melpriciot
Starting Member

1 Posts

Posted - 01/05/2013 :  07:21:21  Show Profile  Reply with Quote
"Create a view named "premiums" that should contain the
name of the employees and a premium column.
Compute the values for the premium column for each
employee as follows:
(absolute_value(
maximum(
number_of_employees_working_on_job_of_employees_manager)
- number_of_employees_working_on_their_own_job)
+ 10) * 20.
The view should contain the following columns:
"first_name", "last_name", "premium"."
"Create a table named "own_jobs" that should contain
the following columns:
"id", string with 10 characters as a maximum length, is the primary key;
"title", string with 35 characters as a maximum length;
"num_of_emps", number, its default value is 0;
"since", of type date.
Please check, the values of the "num_of_emps" column
cannot be a negative number."
"Insert data into the new "own_jobs" table from the HR schema.
The "id" and "title" columns should hold the same data as
the "job_id" and "job_title" columns in the HR.JOBS table.
The "num_of_emps" column should contain the headcount of
those employees who are working on the given job.
The "since" column should contain the earliest "hire_date"
on the given job."
"Update the "own_jobs" table: concatenate the value of "id"
column to value of "title" column in those rows/records where
total length of title and id together is not longer than 35
characters. Format of new title: "title_of_job (id_of_job)"."

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 01/06/2013 :  10:07:19  Show Profile  Reply with Quote
sounds like an assignment question
can we see what you tried yet?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000