I am here to write a SQL statement for finding the weekly summary from a table. I had a table with following fields:
UIN, Date, Staff, work_hours
Now I would like to gather information how many hours has a staff worked in one week.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s hard to tell from your question, but if you’re looking for the total hours in one week by each employee, try the following:
Otherwise, if you’re looking for a full report, summarized by week, you can try the following, which will give you each staff’s weekly hours, aggregated by week: