Create a view of the Join of Deposit and Withdraw transactions to Bank Branch UNION with the join of Bill Payment and Debit Purchase, or Return transactions to Merchant (i.e., all transactions with appropriate reference name.). BranchNbr stores RefNbr of either 'D', OR 'W' transactions, and MerchantNbr stores RefNbr of either 'B', 'P' or 'R' transactions. List of only the Accounts that have multiple Clients associated Provide a count and total amount of Transactions for each Type Description PLEASE DONT NOT COPY THE EXISTING SOLUTION ON BARTLEBY IT IS WRONG AND DOES NOT WORK AND IS INCOMPLETE. GIVEN THE BELOW: --THIS CREATES THE BANK BRANCH TABLE: CREATE TABLE BankBranch ( BranchNbr INT PRIMARY KEY, BranchName VARCHAR(250)); --THIS CREATES THE MERCHANT TABLE: CREATE TABLE Merchant ( MerchantNbr INT PRIMARY KEY, MerchantName VARCHAR(250)); --THIS CREATES THE TRANSACTION TABLE: CREATE TABLE Transaction ( TxNbr INT PRIMARY KEY, AccountNbr INT, TxTypeCode VARCHAR(250), TxDate DATE, TxTime TIMESTAMP, TxAmount FLOAT, RefNbr INT, FOREIGN KEY (AccountNbr)REFERENCES Account(AccountNbr), FOREIGN KEY(TxTypeCode) REFERENCES TxType(TxTypeCode), FOREIGN KEY (RefNbr) REFERENCES BankBranch (BranchNbr), FOREIGN KEY (RefNbr) REFERENCES Merchant (MerchantNbr)); CREATE TABLE Owns ( ClientNbr INT, AccountNbr INT, FOREIGN KEY (ClientNbr) REFERENCES Client(ClientNbr), FOREIGN KEY (AccountNbr) REFERENCES Account(AccountNbr));
Create a view of the Join of Deposit and Withdraw transactions to Bank Branch UNION with the join of Bill Payment and Debit Purchase, or Return transactions to Merchant (i.e., all transactions with appropriate reference name.).
BranchNbr stores RefNbr of either 'D', OR 'W' transactions, and MerchantNbr stores RefNbr of either 'B', 'P' or 'R' transactions.
List of only the Accounts that have multiple Clients associated
Provide a count and total amount of Transactions for each Type Description
PLEASE DONT NOT COPY THE EXISTING SOLUTION ON BARTLEBY IT IS WRONG AND DOES NOT WORK AND IS INCOMPLETE.
GIVEN THE BELOW:
--THIS CREATES THE BANK BRANCH TABLE:
CREATE TABLE BankBranch (
BranchNbr INT PRIMARY KEY,
BranchName VARCHAR(250));
--THIS CREATES THE MERCHANT TABLE:
CREATE TABLE Merchant (
MerchantNbr INT PRIMARY KEY,
MerchantName VARCHAR(250));
--THIS CREATES THE TRANSACTION TABLE:
CREATE TABLE Transaction (
TxNbr INT PRIMARY KEY,
AccountNbr INT,
TxTypeCode VARCHAR(250),
TxDate DATE,
TxTime TIMESTAMP,
TxAmount FLOAT,
RefNbr INT,
FOREIGN KEY (AccountNbr)REFERENCES Account(AccountNbr),
FOREIGN KEY(TxTypeCode) REFERENCES TxType(TxTypeCode),
FOREIGN KEY (RefNbr) REFERENCES BankBranch (BranchNbr),
FOREIGN KEY (RefNbr) REFERENCES Merchant (MerchantNbr));
CREATE TABLE Owns (
ClientNbr INT,
AccountNbr INT,
FOREIGN KEY (ClientNbr) REFERENCES Client(ClientNbr),
FOREIGN KEY (AccountNbr) REFERENCES Account(AccountNbr));
![CLIENT
Client Nbr <pk>
First Name
Last Name
Street
City
Prov_State
Postal Code
Phone
Email
OWNS_CLIENT_FK
OWNS
Client Nbr <pk.fk1>
Account Nbr <pk.fk2>
TRANSACTION ACCOUNT FK
TRANSACTION
Ix Nbr
<pk>
Account Nbr <fk1>
Tx Type Code <fk2>
Tx Date
Tx Amount
Ref Nbr
BANK BRANCH
Branch Nbr <pk>
Branch Name
OWNS ACCOUNT_FK
TX_TYPE_LOOKUP_FK
MERCHANT
Merchant Nbr <pk>
Merchant Name
ACCOUNT
Account Nbr <pk>
Balance
TX_TYPE
Tx Type Code
Tx Type Descript
<pk>](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F3fd06d23-3f74-4635-9f62-11602a559fba%2F4efca3d5-26fa-4cdc-afa0-52e1e1bb750b%2Fwzhk58l_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)