Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For the below questions, use the following schema definition. account ( accountid , username, firstname, lastname ) digitalasset ( assetid , description, dollarprice ) transaction
For the below questions, use the following schema definition. account accountid username, firstname, lastname digitalasset assetid description, dollarprice transaction tranid accountid, timstamp transactiondetail tranid assetid,qtyprice It is a schema for a digitalasset store, with accounts, digitalassets, and transactions that link accounts to digitalassets. Each transaction can have multiple items, which are in transactiondetail table. Pick the best answer that fits the question. Not all of the answers may be correct. If none of the answers fit, write your own answer. points Find account id of John Doe. a select lastname,firstname from account where firstname'John' and lastname'Doe' b select accountid from transaction where firstname'John' and lastname'Doe' c select accountid from account where firstname'John' and lastname'Doe' d select accountid from account inner join transactiondetail usingaccountid where first name'John' and lastname'Doe' e Other: points Find the average price of a digitalasset. a select avgprice from transactiondetail b select avgdollarprice from digitalasset c select avgqtydollarprice from digitalasset d select avgprice from digitalasset e Other: points Find number of transactions by account. a select accountid,count from transaction natural inner join transactiondetail group by accountid b select assetid,count from transactiondetail group by assetid c select tranid,count from transactiondetail group by tranid d select accountid,count from transaction group by accountid e Other: points Find names descriptions of all digital assets ever purchased by 'John Doe'. a select count from account a natural inner join transaction b natural inner join transac tiondetail c where alastname'Doe' and afirstname'John' b select description from account a natural inner join transaction b natural inner join transac tiondetail c natural inner join digitalasset d where alastname'Doe' and afirstname'John' group by description
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started