🔒 Closed Select max date for each type for each employee

Status
Not open for further replies.
eto tngnan mo eto output nito

SELECT employee.emp_id,type,date,amount FROM employee
INNER JOIN
(
SELECT MAX(emp_id) as emp_id FROM employee GROUP BY type,empid
)as tb ON tb.emp_id = employee.emp_id where empid =1


upload_2018-8-16_15-44-7.png

ikaw na bahala mag bago mag aad ka ng empid sa field kasi wala ka primary key ung emp_id naka auto increment yan

tapos na problem mo
 

Attachments

  • upload_2018-8-16_15-35-7.png
    upload_2018-8-16_15-35-7.png
    1.8 KB · Views: 0
  • upload_2018-8-16_15-38-33.png
    upload_2018-8-16_15-38-33.png
    2.4 KB · Views: 0
Status
Not open for further replies.

About this Thread

  • 21
    Replies
  • 1K
    Views
  • 6
    Participants
Last reply from:
Phcmjal

Trending Topics

Online now

Members online
912
Guests online
1,025
Total visitors
1,937

Forum statistics

Threads
2,272,633
Posts
28,944,107
Members
1,237,286
Latest member
prtprtprptuuu
Back
Top