Page 1 of 1

QUERY

PostPosted: Sat Jan 19, 2019 5:33 pm
by Bhanu_Praveen
Hello everyone,

I have a requirement described below.

I need to select deptno,maximum salary, minimum salary of each dept from emp table where dept contains atleast 2 employees and maximum salary in dept is > 50000.

I have attached the table data and query I have tried which is not giving any result , neither an error.

Re: QUERY

PostPosted: Sat Jan 19, 2019 5:59 pm
by enrico-sorichetti
if You want people pay attention to Your questions, You should learn to use better titles/subjects

subject: query
text: where is the toilet ?

the question asked fits the subject :mrgreen:

Help needed to write an SQL query

PostPosted: Sat Jan 19, 2019 7:55 pm
by Bhanu_Praveen
Subject edited

Re: QUERY

PostPosted: Sat Jan 19, 2019 9:59 pm
by steve-myers
Not only that, but we primarily discuss mainframe DB2, not toy machine DB2 in this forum.

Re: QUERY

PostPosted: Sun Jan 20, 2019 5:29 pm
by NicC
Please do not post images - a simple cut and paste will do fine but ensure you use the code tags (search the forum for information on this) around your pasted data.