I have two tables, employees and transactions, as follows:
employees:
EmployeeID
firstname
lastname
transactions:
TransactionID
employeeID
amount
How would I get the total 'amount' for all employees with the firstname 'John'? Thanks!
Select sum(amount)
from transactions
where employeeID = (everyone with first name John)