question

angel90 avatar image
angel90 asked

SQL Newbie question

Given the two tables , write an SQL query to provide the sum of 'BreakMinutes' for 'agentABC' for each 'ProfileName' and 'Date' record available for agent 'agentABC'. ![PICTURE][1] [1]: /storage/temp/4061-fullsizerender10.jpg
t-sqlhomework
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

If you want to ask a different question, just ask a new question. Note: I've reverted to the previous version of the question, so the answer below makes sense in context.
0 Likes 0 ·

1 Answer

ThomasRushton avatar image
ThomasRushton answered
So you want us to write you a query that [SELECT][1]s the [SUM][2] of BreakMinutes along with the Date and the ProfileName FROM StaffingDetails [JOIN][3]ed to Profiles ON the Profile ID of Profiles matching the Profile ID of StaffingDetails [WHERE][4] the Agent is "agentABC" when [GROUPed BY][5] Date and ProfileName? What's the problem you're having? What have you tried so far? [1]: https://docs.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql [2]: https://docs.microsoft.com/en-us/sql/t-sql/functions/sum-transact-sql [3]: https://msdn.microsoft.com/en-us/library/zt8wzxy4.aspx [4]: https://docs.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql#examples [5]: https://docs.microsoft.com/en-us/sql/t-sql/queries/select-examples-transact-sql#h-using-group-by-and-where
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.