Show Query Output in Single Row

I have a table that records each time the price of a job is created or subsequently amended, eg:

Id      JobId       Rate
1       100123     90.00
2       100123     85.00
3       100123     75.00
4       100124     80.00
5       100124     85.00
6       100125     90.00

I want to report on is the highest and lowest rates per job, so:

Required output:

JobId        HighestRate         LowestRate
100123     90.00                   75.00

Any help would be appreciated!

Thanks

lapchien

100124     85.00                   80.00
100125     90.00                   90.00
LapchienDirectorAsked:
Who is Participating?
 
sachinpatil10dCommented:
Try this.
select jobId,Max(Rate)  HighestRate,min(Rate) LowestRate from tmpTable group by jobid

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.