Hi guys ... i was wondering if any of you can help me on a little problem i have ... i need to build a SQL UNION query using SELECT, UNION / UNION ALL, WHERE, GROUP BY (no INNER JOIN like the design view in MS Access does). I've been trying to do it for the last few weeks but nothing!
Here are my tables:
Employee: id_employee, salary
penalty: id_employee, penalty, date_of_penalty
I need to take the 2 tables and create a query to calculate the final salary final_salary=salary-penalty and print the results in a new table with the structure: Table:id_employee, salary, penalty, date_of_penalty, final_salary.
if any of you can help me i would be very thankful!