Jiraiya-Sama
New member
- Local time
- Today, 06:42
- Joined
- Jun 12, 2009
- Messages
- 2
Hello Hi,
I have a question about calculating subtotal and rate.
I have 2 tables - TimeLog and Rate
TimeLog
- StaffID
- WorkingHrs
Example
Rate
- StaffID
- Rate
Example
Now i want to create a query to calculate total working hours for each staff and then multiply the rate.
So, I want to create something like this...
Any suggestions how to create this query would be appreciated
Thanks very much.
I have a question about calculating subtotal and rate.
I have 2 tables - TimeLog and Rate
TimeLog
- StaffID
- WorkingHrs
Example
Code:
[U]StaffID WorkingHrs[/U]
A123 5
B234 3
C345 6
A123 4
C345 2
Rate
- StaffID
- Rate
Example
Code:
[U]StaffID Rate[/U]
A123 2.5
B234 4.5
C345 3.2
Now i want to create a query to calculate total working hours for each staff and then multiply the rate.
So, I want to create something like this...
Code:
[U]StaffID TotalHrs Rate Salary[/U]
A123 9 2.5 22.5
B234 3 4.5 13.5
C345 8 3.2 25.6
Any suggestions how to create this query would be appreciated

Thanks very much.