Skip to content
Advertisement

MYSQL joins and then making queries on the joined table

I am trying to do a join on a database and subsequent queries, in this database which is a dummy one from MYSQL y hace these tables

and in the salaries table i have something like these

So I am trying to sum the salary and group the result by employee number so I have just one value per number, so That row could be used for a join with the employees table so I can do a query with the joined table, nevertheless I cannot do the join, I am trying to do something like these:

so chat can i do to figure out this task? THANKS

Advertisement

Answer

Assuming you just want the total salaries by employee, you don’t even need the employees table:

I would expect that you want it as of a certain date:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement