Question: Please also give an explanation for the solution. Thanks The tables are given twice by mistake. please ignore second table. 5 SQL 6 7 8

5 SQL 6 7 8 9 10 Introduction Consider the database structure below. The main table is the [values] table that stores a monthly trial balance for each of the Client's entities for each account in the trial balance. The Logs table captures details about each upload event so that you can identify and query the most recent record. See the "Sample records" worksheet for example records in each table 11 12 13 14 15 AccountDetails AcctID AcctDesc Entity Details EntID EntDesc Values ID AcctID EntiD LogID Month Value 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Logs Login TimeStamp User Name UploadDesc Values AccountDetails AcctID AcctDesc Entity Details EntiD EntDesc ID -AcctID EntID -LogID Month Value 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Logs LogID TimeStamp User Name UploadDesc 32 33 34 35 Required 1. Draft an SQL query (in T-SQL) that would return all fields in the Values table and also pull in the Account, Entity and Upload descriptions. 2. Describe how you would use the logs table to query the most recent data available in the database for each entity/account/month combination. 36 37
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
