Hi,
Below are the answers-
Ans 1-
select cid,cname from customer c
join Account a
on c.cid=a.cno
and a.atype='second'; //Using the account type to filter data
Ans 2 -
select cid,cname from customer c
join Account a
on c.cid=a.cno
and a.bcode='2'; //Using the branch code to filter data
Ans 3 -
select ano, cname from customer c
join Account a
on c.cid=a.cno
and a.bcode='2'
and balance <= 1000;
Transaction Account ano atype balance bcode cno bcode tid type tdate tamount accountno bname Customer cid...
Write the following queries in Relational Algebra, for the following bank schema: account (ano, bname, balance) branch (bname, bcity, assest) customer (Cname, cstreet, ccity) loan (lno, bname, amount) deposit (cname, ano) borrower (cname, ino) -Select all loan tuples where branch name is Abha. -Select all loan tuples where branch name is Abha and loan amount less than 200000. Please type the solution on the keyboard so that I can copy and paste
consider the following schema: Product(pid, name, type, manufacturer, price) key: pid Buys(cid, pid) key: cid and pid together Customer(cid, cname, age, gender) key: cid 1) write the following query in relational algebra; find the names of all customers who have purchased all products manufactured by sears. 2)write the following in sql: find the names of all the customers who have not purchased the most expensive product. 3)write the following query in sql: find the best selling products (in terms of...
consider the following schema: Product(pid, name, type, manufacturer, price) key: pid Buys(cid, pid) key: cid and pid together Customer(cid, cname, age, gender) key: cid 1) write the following query in relational algebra; find the names of all customers who have purchased all products manufactured by sears. 2)write the following in sql: find the names of all the customers who have not purchased the most expensive product. 3)write the following query in sql: find the best selling products (in terms of...
CUSTTYPE (TID, TypeDesc) CUSTOMER (CID, Lname, Fname, TID, Address, ZIPcode) CUSTORDER (OrderNo, OrderDate, PromiseDate, ShippedDate, ShippingTerm, SalesID, CID) SALESREP (SalesID, Name, Phone, Address, ZIPcode, RepType) ORDERLINE (OrderNo, PID, Qty, Qty_RETD) FTSALESREP (SalesID, MonthPay, Rank) PTSALESREP (SalesID, HourlyRate, WeekHours) ZIP_TABLE (ZIPcode, City, State) VENDOR (VID, Name, Phone ZIPcode) PRODUCT (PID, CateID, ProdName, ProdFinish, Price, Qty_on_Hand, Description, VID) CATEGORY (CateID, CateType) Local View #1: Use three base tables to develop a SQL statement that will list the following information for a customer,...
Question 1: Please transform the following E-R diagram to relations (40 points) CID Name Street Customer Refers State City City Address Address State Zip Code Street Holds Zip Code Merchant Card Type AccountID Card Account Has Exp Date Charge Date Charge Time Card Type = "C Debit Card Credit Card Has Charges Current Balance Bank No. Amount
permits a customer to preauthorize a depository institution to move funds from a savings account to a transaction account in order to cover overdrafts. Automatic transfers (ATS) Sweep account NOW account SNOW account MMDA
(Reading & Writing Business Objects) I need to have my Classes be able to talk to Files. How do I make it such that I can look in a File for an account number and I am able to pull up all the details? The file should be delimited by colons (":"). The Code for testing 'Select' that goes in main is: Account a1 = new Account(); a1.select(“90001”); a1.display(); Below is what it should look like for accounts 90000:3003:SAV:8855.90 &...
For the below `bank' schema: customer(customerid,username,fname,lname,street1,street2,city,state,zip) account(accountid,customerid,description,) transaction(transactionid,trantimestamp,accountid,amount) A customer may have several accounts, and each account may participate in many transactions. Each transaction will have at least two records, one deducting amount from an account, and one adding amount to an account (for a single transactionid, the sum of amounts will equal zero). Using SQL, answer these questions (write a SQL query that answers these questions): 8) List the top 1% of customers (ordered by total balance). 9) Using...
The Checking account is interest free and charges transaction fees. The first two monthly transactions are free. It charges a $3 fee for every extra transaction (deposit, withdrawal). The Gold account gives a fixed interest at 5% while the Regular account gives fixed interest at 6%, less a fixed charge of $10. Whenever a withdrawal from a Regular or a Checking account is attempted and the given value is higher than the account's current balance, only the money currently available...
Which Special Journal would the following transaction be journalized in? Sold merchandise on account to Customer Company terms 2/10, n/30 for 7,000.00 with a cost of 3,000.00. Choose the best answer below: Multiple Choice Sales Journal Purchases Journal Cash Payment Journal/Cash Disbursements Journal Cash Receipts Journal General Journal