a) Write a query that finds a name, a surname, and a phone of a customer who has an account with an amount larger than 100.000 EUR, and at least one payment to the company IBM. Use relational algebra and relational calculus! b) Write a query in SQL that prints the ids and surnames of customers who have more than 3 payments to the company IBM, each of them with an amount that is larger than 2000 EUR. Customer (cid, name, surname, city, address, phone); Account (aid, cid, amount, created, comment); Payment (pid, payer_aid, ref_num, vend_aid, vend_com, amount, date); Transfer (tid, from_aid, to_aid, cid, amount, date, descr);

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter1: Overview Of Database Concepts
Section: Chapter Questions
Problem 5HOA: Access path A database table is composed of records and fields hold data. Data is stored in records....
icon
Related questions
Question
a) Write a query that finds a name, a surname, and a phone of a customer who
has an account with an amount larger than 100.000 EUR, and at least one payment to
the company IBM. Use relational algebra and relational calculus!
b) Write a query in SQL that prints the ids and surnames of customers who have
more than 3 payments to the company IBM, each of them with an amount that is larger
than 2000 EUR.
Transcribed Image Text:a) Write a query that finds a name, a surname, and a phone of a customer who has an account with an amount larger than 100.000 EUR, and at least one payment to the company IBM. Use relational algebra and relational calculus! b) Write a query in SQL that prints the ids and surnames of customers who have more than 3 payments to the company IBM, each of them with an amount that is larger than 2000 EUR.
Customer (cid, name, surname, city, address, phone);
Account (aid, cid, amount, created, comment);
Payment (pid, payer_aid, ref_num, vend_aid, vend_com, amount, date);
Transfer (tid, from_aid, to_aid, cid, amount, date, descr);
Transcribed Image Text:Customer (cid, name, surname, city, address, phone); Account (aid, cid, amount, created, comment); Payment (pid, payer_aid, ref_num, vend_aid, vend_com, amount, date); Transfer (tid, from_aid, to_aid, cid, amount, date, descr);
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning