I want to do sql min and then do a division but the error appears "you tried to execute a query that does not include specified expression 'EMPID' as part of an aggregate function"
Thanks
SELECT tblEmployeeCriteria.EMPID,tblEmployee.NAME,
tblEmployeeCriteria.SKILL/MIN(tblEmployeeCriteria.SKILL)*100
FROM tblEmployeeCriteria
INNER JOIN tblemployee ON tblEmployeeCriteria.EMPID = tblemployee.EMPID
Database :
tblemployee
EMPID | NAME |
---|---|
10037 | Tamendran |
10046 | Ponisan |
10085 | Vanu |
tblEmployeeCriteria
EMPID | SKILL |
---|---|
10037 | 90 |
10046 | 80 |
10085 | 50 |
Desired Result :
EMPID | NAME | SKILL |
---|---|---|
10037 | Tamendran | 180 |
10046 | Ponisan | 170 |
10085 | Vanu | 100 |
EXAMPLE VALUE SKILL FROM TAMENDRAN : 90/50*100=180