using the code below write a query to display the minimum balance, maximum balance, and average balance for memberships that have a rental CREATE TABLE MEMBERSHIP ( MEM_NUM                   NUMBER(8,0) PRIMARY KEY, MEM_FNAME   VARCHAR2(30) NOT NULL, MEM_LNAME   VARCHAR2(30) NOT NULL, MEM_STREET  VARCHAR2(120), MEM_CITY                   VARCHAR2(50), MEM_STATE    CHAR(2), MEM_ZIP                     CHAR(5), MEM_BALANCE           NUMBER(10,2) ); CREATE TABLE RENTAL ( RENT_NUM      NUMBER(8,0) PRIMARY KEY, RENT_DATE     DATE DEFAULT SYSDATE, MEM_NUM       NUMBER(8,0) CONSTRAINT RENTAL_MEM_NUM_FK REFERENCES MEMBERSHIP ); INSERT INTO MEMBERSHIP VALUES (102, 'TAMI', 'DAWSON', '2632 TAKLI CIRCLE', 'NORENE', 'TN', '37136', 11); INSERT INTO MEMBERSHIP VALUES (103, 'CURT', 'KNIGHT', '4025 CORNELL COURT', 'FLATGAP', 'KY', '41219', 6); INSERT INTO MEMBERSHIP VALUES (104, 'JAMAL', 'MELENDEZ', '788 EAST 145TH AVENUE', 'QUEBECK', 'TN', '38579', 0); INSERT INTO MEMBERSHIP VALUES (105, 'IVA', 'MCCLAIN', '6045 MUSKET BALL CIRCLE', 'SUMMIT', 'KY', '42783', 15); INSERT INTO MEMBERSHIP VALUES (106, 'MIRANDA', 'PARKS', '4469 MAXWELL PLACE', 'GERMANTOWN', 'TN', '38183', 0); INSERT INTO MEMBERSHIP VALUES (107, 'ROSARIO', 'ELLIOTT', '7578 DANNER AVENUE', 'COLUMBIA', 'TN', '38402', 5); INSERT INTO MEMBERSHIP VALUES (108, 'MATTIE', 'GUY', '4390 EVERGREEN STREET', 'LILY', 'KY', '40740', 0); INSERT INTO MEMBERSHIP VALUES (109, 'CLINT', 'OCHOA', '1711 ELM STREET', 'GREENEVILLE', 'TN', '37745', 10); INSERT INTO MEMBERSHIP VALUES (110, 'LEWIS', 'ROSALES', '4524 SOUTHWIND CIRCLE', 'COUNCE', 'TN', '38326', 0); INSERT INTO MEMBERSHIP VALUES (111, 'STACY', 'MANN', '2789 EAST COOK AVENUE', 'MURFREESBORO', 'TN', '37132', 8); INSERT INTO MEMBERSHIP VALUES (112, 'LUIS', 'TRUJILLO', '7267 MELVIN AVENUE', 'HEISKELL', 'TN', '37754', 3); INSERT INTO MEMBERSHIP VALUES (113, 'MINNIE', 'GONZALES', '6430 VASILI DRIVE', 'WILLISTON', 'TN', '38076', 0); INSERT INTO RENTAL VALUES (1001, '01-MAR-23', 103); INSERT INTO RENTAL VALUES (1002, '01-MAR-23', 105); INSERT INTO RENTAL VALUES (1003, '02-MAR-23', 102); INSERT INTO RENTAL VALUES (1004, '02-MAR-23', 110); INSERT INTO RENTAL VALUES (1006, '02-MAR-23', 107); INSERT INTO RENTAL VALUES (1007, '02-MAR-23', 104); INSERT INTO RENTAL VALUES (1008, '03-MAR-23', 105); INSERT INTO RENTAL VALUES (1009, '03-MAR-23', 111);

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

using the code below write a query to display the minimum balance, maximum balance, and average balance for memberships that have a rental

CREATE TABLE MEMBERSHIP (

MEM_NUM                   NUMBER(8,0) PRIMARY KEY,

MEM_FNAME   VARCHAR2(30) NOT NULL,

MEM_LNAME   VARCHAR2(30) NOT NULL,

MEM_STREET  VARCHAR2(120),

MEM_CITY                   VARCHAR2(50),

MEM_STATE    CHAR(2),

MEM_ZIP                     CHAR(5),

MEM_BALANCE           NUMBER(10,2)

);

CREATE TABLE RENTAL (

RENT_NUM      NUMBER(8,0) PRIMARY KEY,

RENT_DATE     DATE DEFAULT SYSDATE,

MEM_NUM       NUMBER(8,0) CONSTRAINT RENTAL_MEM_NUM_FK REFERENCES MEMBERSHIP

);

INSERT INTO MEMBERSHIP VALUES (102, 'TAMI', 'DAWSON', '2632 TAKLI CIRCLE', 'NORENE', 'TN', '37136', 11);

INSERT INTO MEMBERSHIP VALUES (103, 'CURT', 'KNIGHT', '4025 CORNELL COURT', 'FLATGAP', 'KY', '41219', 6);

INSERT INTO MEMBERSHIP VALUES (104, 'JAMAL', 'MELENDEZ', '788 EAST 145TH AVENUE', 'QUEBECK', 'TN', '38579', 0);

INSERT INTO MEMBERSHIP VALUES (105, 'IVA', 'MCCLAIN', '6045 MUSKET BALL CIRCLE', 'SUMMIT', 'KY', '42783', 15);

INSERT INTO MEMBERSHIP VALUES (106, 'MIRANDA', 'PARKS', '4469 MAXWELL PLACE', 'GERMANTOWN', 'TN', '38183', 0);

INSERT INTO MEMBERSHIP VALUES (107, 'ROSARIO', 'ELLIOTT', '7578 DANNER AVENUE', 'COLUMBIA', 'TN', '38402', 5);

INSERT INTO MEMBERSHIP VALUES (108, 'MATTIE', 'GUY', '4390 EVERGREEN STREET', 'LILY', 'KY', '40740', 0);

INSERT INTO MEMBERSHIP VALUES (109, 'CLINT', 'OCHOA', '1711 ELM STREET', 'GREENEVILLE', 'TN', '37745', 10);

INSERT INTO MEMBERSHIP VALUES (110, 'LEWIS', 'ROSALES', '4524 SOUTHWIND CIRCLE', 'COUNCE', 'TN', '38326', 0);

INSERT INTO MEMBERSHIP VALUES (111, 'STACY', 'MANN', '2789 EAST COOK AVENUE', 'MURFREESBORO', 'TN', '37132', 8);

INSERT INTO MEMBERSHIP VALUES (112, 'LUIS', 'TRUJILLO', '7267 MELVIN AVENUE', 'HEISKELL', 'TN', '37754', 3);

INSERT INTO MEMBERSHIP VALUES (113, 'MINNIE', 'GONZALES', '6430 VASILI DRIVE', 'WILLISTON', 'TN', '38076', 0);

INSERT INTO RENTAL VALUES (1001, '01-MAR-23', 103);

INSERT INTO RENTAL VALUES (1002, '01-MAR-23', 105);

INSERT INTO RENTAL VALUES (1003, '02-MAR-23', 102);

INSERT INTO RENTAL VALUES (1004, '02-MAR-23', 110);

INSERT INTO RENTAL VALUES (1006, '02-MAR-23', 107);

INSERT INTO RENTAL VALUES (1007, '02-MAR-23', 104);

INSERT INTO RENTAL VALUES (1008, '03-MAR-23', 105);

INSERT INTO RENTAL VALUES (1009, '03-MAR-23', 111);

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education