Hallo,
I have the following table (Table1)
ename salary
a 100
b 200
c 300
d 400
and am supposed to bring the minimum salary value and ename, when a query is run. The following SQL syntax brings all the ename and salary, regardless inserting min..
SELECT Table1.ename, Min(Table1.salary) AS MinOfsalary
FROM Table1
GROUP BY Table1.ename;
Secondly, I have to write another query to show the third last salary and ename only from the list..
any ideas.. Thanks
I have the following table (Table1)
ename salary
a 100
b 200
c 300
d 400
and am supposed to bring the minimum salary value and ename, when a query is run. The following SQL syntax brings all the ename and salary, regardless inserting min..
SELECT Table1.ename, Min(Table1.salary) AS MinOfsalary
FROM Table1
GROUP BY Table1.ename;
Secondly, I have to write another query to show the third last salary and ename only from the list..
any ideas.. Thanks