CREATE A TABLE WITH SQL Task1: Construct and run the code for a natural inner jo
ID: 3571529 • Letter: C
Question
CREATE A TABLE WITH SQL
Task1: Construct and run the code for a natural inner join on the two tables AccountState and AccountUserState Task 2: Construct and run the code for a natural inner join of AccountState, AccountUserState, ClientProperty Task 3: Construct and run the code for Right outer join on ClientProperty and AccountUserState Task 4: Construct and run the code to sum the account totals for each branch. NOTE you may ignore foreign keys for this assignment and for the final quiz but must show primary keys) Task 1. The diagram below and its data use cases are the basis for this assignment. A12.6DB Note: This material will be used in the final quiz, so please follow the instructions and have a database and your tables ready. On the quiz I will ask you to run several SQL queries against this base and its data, Paste your results into a .doc and upload. I will probably ask you to insert a line or two of data into one of the tables and run with that.. Construct your own database for this and enter the data. AccountNr, BranchNr, ClientNr PlaceCode, are all Int. MoneyAmout is Decimal with 7 digits total with 2 digits to the right of the decimal. CityName and ClientName are Varchar(15)
Explanation / Answer
1.select row1,row2....rom n from AccountState a,AccountUserState b where a.id=b.id
2.select row1,row2....rom n from AccountState a, AccountUserState b, ClientProperty c
where a.id=b.id and b.id=c.id
3. select sum(monyamount) from from table-name
group by branchNr
4.create table Accounts(AccountNr Number,BranchNr number,ClientNr number,placecode number,manyamount number(7,2),cityname varchar2(15),clientname varchar2(15))
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.