Help with a Query formula - latest date from unique values in another column

Help with a Query formula - latest date from unique values in another column

I have a query table I am developing to show only unique value (Project Name) and most recent date (Last Modified) and total all of the time entries from all the values (Hours) in a report from the query, but I do not know how to do this.  The data table I am referencing is like this:


And I need to write a query that I can use in a report that will result in this (totaling the hours from all of the matching values in Project Name, but showing only the most recent Last Modified Date, and the Project Name only once, unique):


Can someone help with the code I need for the query table?