tglaser 0 Posted August 20, 2019 Report Share Posted August 20, 2019 Hello , i am struggling to identify how to add a summary row to a query I am implementing. I have 2 columns, Name, time worked, I want to identify two things; 1. the total time worked per name, and 2 the total time worked by everyone. Can you help ? Current Query: SELECT Name, sum(hours) AS Hours FROM timecard Group by Name; Goal shown below. Name Hours John 5 Mary 6 Ed 7 Total 18<----THIS IS THE ROW I NEED TO ADD!!! Quote Link to post Share on other sites
justsomeguy 1,135 Posted August 21, 2019 Report Share Posted August 21, 2019 The sum would come from another query, although depending on which database you're using you can probably use subqueries to group the results from multiple queries into one result set. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.