Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a SQL query for: Who borrowed most and how much? Display customer name and amount borrowed in your SQL statement. create table account (account_number

Write a SQL query for:

Who borrowed most and how much? Display customer name and amount borrowed in your SQL statement.

create table account

(account_number varchar(15) not null,

branch_name varchar(15) not null,

balance number not null,

primary key(account_number));

create table branch

(branch_name varchar(15) not null,

branch_city varchar(15) not null,

assets number not null,

primary key(branch_name));

create table customer

(customer_name varchar(15) not null,

customer_street varchar(12) not null,

customer_city varchar(15) not null,

primary key(customer_name));

create table loan

(loan_number varchar(15) not null,

branch_name varchar(15) not null,

amount number not null,

primary key(loan_number));

create table depositor

(customer_name varchar(15) not null,

account_number varchar(15) not null,

primary key(customer_name, account_number),

foreign key(account_number) references account(account_number),

foreign key(customer_name) references customer(customer_name));

create table borrower

(customer_name varchar(15) not null,

loan_number varchar(15) not null,

primary key(customer_name, loan_number),

foreign key(customer_name) references customer(customer_name),

foreign key(loan_number) references loan(loan_number));

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

=+j on to staff their operations in the global marketplace.

Answered: 1 week ago