SQLTeam.com | Weblogs | Forums

Answer the following sql questions

It seems you want others to do your homework for you. You didn't even took the effort to type in the question. :-1: :-1: :-1: :-1:

Show us that you take an interest in the subject, that you tried to find a solution. If you get struck, then you can post the problem and the solution you got so far. And if we can, we will try to help you.

I hope nobody on the forum will give you the answers just like that.
This forum is here to help people who get struck somewhere, not to do their homework.

no madam its not like that..i have tried the solutions but some them are not correct .to correct the wrong answers i posted the questions.i show my work then tell where i am wrong..

SELECT
distinct Extended_step
from salary_range_by_job_classification;

Select
min(Biweekly_high_Rate)
From salary_range_by_job_classification

SELECT
Max(Biweekly_high_Rate)
from salary_range_by_job_classification

Select
pay_type
from salary_range_by_job_classification
where Job_Code like '03%'

Select
Eff_Date,
Sal_End_Date
from salary_range_by_job_classification
where Grade like '%Q90H0%'

select
Biweekly_Low_Rate
from salary_range_by_job_classification
order by Biweekly_Low_Rate ASC

select Step, Job_Code
from salary_range_by_job_classification
where Job_Code in(0110,0400)

select (Biweekly_High_Rate) -(Biweekly_Low_Rate)
from salary_range_by_job_classification
where Job_Code='0170'

Select
Extended_step,
Pay_Type
From salary_range_by_job_classification
Where Pay_Type in ('M', 'H', 'D');

SELECT
Union_code,
SetID,
Step
from salary_range_by_job_classification
where Union_code = 990 and (SetID = 'SFMTA' or SetID = 'COMMN')

hi

i first tried to create sample data ... i will work on the answers and post in 2 hrs !!! :slight_smile:

please click arrow to the left for drop CREATE data
drop table salary_range_by_job_classification 
go 

create table salary_range_by_job_classification 
(
SetId int ,
Job_Code varchar(100),
Eff_Date date ,
Sal_End_Date date, 
Salary_SetId int, 
Sal_Plan varchar(100),
Grade varchar(100),
Step varchar(100),
BiWeekly_High_rate money,
BiWeekly_Low_rate money,
Union_Code varchar(100),
Extended_SetUp varchar(100),
Pay_type varchar(100) 
)
go 

insert into salary_range_by_job_classification select 1,'03JobCode123','2019-10-08','2019-10-15',2,'SalPlan333','GradeA','Step222','$134.00','$50.00' ,'UnionCodeAAAAA','ExtSetUp_111','PayTypeAAA'
insert into salary_range_by_job_classification select 2,'03JobCode444','2019-09-15','2019-09-19',2,'SalPlan333','GradeB','Step111','$190.00','$100.00','UnionCodeBBBBb','ExtSetUp_111','PayTypeQQQ'
insert into salary_range_by_job_classification select 3,'06JobCode500','2019-02-10','2019-03-30',2,'SalPlan210','GradeB','Step222','$130.00','$43.00' ,'UnionCodecdfcc','ExtSetUp_111','PayTypeQQQ'


insert into salary_range_by_job_classification select 4,'06JobCode123','2019-10-14','2019-10-17',2,'SalPlan444','Q90H0','Step100','$145.00','$78.00' ,'UnionCodessss','ExtSetUp_444','PayTypeAAA'
insert into salary_range_by_job_classification select 5,'06JobCode600','2019-05-15','2019-09-19',2,'SalPlan567','GradeB','Step111','$167.00','$90.00','UnionCodeppps','ExtSetUp_500','PayTypezzz'
insert into salary_range_by_job_classification select 6,'03JobCode500','2019-07-10','2019-07-30',2,'SalPlan010','GradeB','Step222','$70.00','$43.00' ,'UnionCodecdfcc','ExtSetUp_222','PayTypezzz'


select 'sample data',* from salary_range_by_job_classification
go

I will keep adding answers to this post !!!

select 
    FORMAT(min(BiWeekly_High_rate) , 'C', 'en-us') AS Dollars 
from 
  salary_range_by_job_classification

image

select 
    FORMAT(max(BiWeekly_High_rate) , 'C', 'en-us') AS Dollars 
from 
  salary_range_by_job_classification

image

select 
   Pay_type 
from 
  salary_range_by_job_classification 
     where Job_Code like '03%'

image

select 
   Eff_Date
  ,Sal_End_Date 
from 
  salary_range_by_job_classification 
     where Grade = 'Q90H0'

image

image

select 
   BiWeekly_Low_rate
from 
  salary_range_by_job_classification 
     order by 
	       BiWeekly_Low_rate

image

send the remaining answers for questions 6,7,8..

I'm glad I was wrong. It would help Harish a great deal if you could provide him with the sample data for the table. Not a picture of it, but with an INSERT VALUES script.

rajeshveeru

42m

send the remaining answers for questions 6,7,8..

No "Thank you" for Harish's work so far.
Only a demand for more.

You're not very polite to the person who is helping you.

Wim

Its a cultural issue !!!! Thanks and Please are very very common in U.S , Europe

( plus person to person )
...Its also on a person to person basis !!!
The guy may not even know English !!!!

All kinds of people !!! all over the world !!!

He may be in a hurry!!!
or just needs to have some ORANGE Juice :slight_smile: wink


select
Step
from
salary_range_by_job_classification
Where
Job_Code = '0110-0400'


select
Extended_Step
from
salary_range_by_job_classification
Where
Pay_type in ( 'M','H' )


select
Step
from
salary_range_by_job_classification
Where
Union_Code = '990'
AND
Set_Id in ('SFMTA','COMMN')

thanks to both of you harish and wim_leys .you both think that i am little bit lazy person ..but i am not ..i just posted question to cross check my answers.while doing the work i got stuck at some point.to clear that confusions i just posted the question ..i completed the answers in early morning today..but why i was asking the question that send the answers of 7,8,9 is ,its an excitement to check my answers with harish ..my answers are correct or not..any way thanks for your help..both of you wim and harish..wim don't misunderstand me..sorry for my english.
i will be waiting for your reply..