Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given: SQL> select * from borrower; CUSTOMER_NAME LOAN_NUMBER --------------- --------------- Adams L-16 Curry L-93 Hayes L-15 Jackson L-14 Jones L-17 McBride L-20 Smith L-11 Smith

Given: SQL> select * from borrower; CUSTOMER_NAME LOAN_NUMBER --------------- --------------- Adams L-16 Curry L-93 Hayes L-15 Jackson L-14 Jones L-17 McBride L-20 Smith L-11 Smith L-21 Smith L-23 Williams L-17 10 rows selected. CUSTOMER_NAME ACCOUNT_NUMBER --------------- --------------- Hayes A-101 Hayes A-102 Johnson A-101 Johnson A-201 Johnson A-444 Jones A-217 Lindsay A-222 Majeris A-333 Smith A-215 Smith A-444 Turner A-305 11 rows selected Question: What is the SQL command to find all customers who have a loan but do not have an account at the bank?

SELECT DISTINCT customer_name FROM depositor WHERE customer_name NOT IN (SELECT customer_name FROM borrower);

SELECT DISTINCT customer_name FROM borrower WHERE customer_name NOT IN (SELECT customer_name FROM depositor);

SELECT DISTINCT customer_name FROM borrower LESS SELECT customer_name FROM depositor;

SELECT DISTINCT customer_name FROM borrower WHERE NOT IN (SELECT customer_name FROM depositor);

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago