Microsoft Access Query Total Group By In R

P: 9
Hello,
I am trying to build a query that subtotals the amount of hours worked and earnings made per pay period for each employee. I built a Payroll table with employee name, start time, end time, lunch in, lunch out, hourly rate and added these fields to my query to form new fields with expressions to calculate the total hours worked per day (end time- start time) and the earnings made per day (total hours worked per day x hourly rate)and now I would like to subtotal the hours worked and earnings made per payperiod for each employee.
I put the criteria for the date field between #1/30/2012#and#2/5/2012#, which is the pay period I want to look at, and I tried grouping the sum of my new field expressions (hours worked per day, earnings made per day) and when I try to run the query summing both expressions, a message pops up saying, 'subqueries cannot be used in the expression ([total hours]*[hourly rate])'. When I try grouping the sum of one expression, for example the earnings made per day expression field, a message pops up saying, 'you need to execute a query that does not include the specified expression '([end time]-[start time])'.
How do I subtotal and grand total my hours and earnings for each employee for the specified date range?
QueryMicrosoft Access Query Total Group By In R
P: 9
Hello,
I am trying to build a query that subtotals the amount of hours worked and earnings made per pay period for each employee. I built a Payroll table with employee name, start time, end time, lunch in, lunch out, hourly rate and added these fields to my query to form new fields with expressions to calculate the total hours worked per day (end time- start time) and the earnings made per day (total hours worked per day x hourly rate)and now I would like to subtotal the hours worked and earnings made per payperiod for each employee.
I put the criteria for the date field between #1/30/2012#and#2/5/2012#, which is the pay period I want to look at, and I tried grouping the sum of my new field expressions (hours worked per day, earnings made per day) and when I try to run the query summing both expressions, a message pops up saying, 'subqueries cannot be used in the expression ([total hours]*[hourly rate])'. When I try grouping the sum of one expression, for example the earnings made per day expression field, a message pops up saying, 'you need to execute a query that does not include the specified expression '([end time]-[start time])'.
How do I subtotal and grand total my hours and earnings for each employee for the specified date range?

Total Group Mortgage

In Microsoft Access 2016, you can save and overwrite the current query by right-clicking its tab and selecting Save. To save the revised query as some other name, allowing the current query to persist, click the File tab, select Save As and then Save Object As. This page will show you how to connect to a MS Access database in R and return data. This requires the package RODBC. Note that this only works with 32 bit Windows. Try odbcDriverConnect through RODBC for 64 bit (sorry, you’ll have to find instructions elsewhere). Note that the examples on this page show how to connect to Access using SQL.