In Sql These are some database from a set of tables insert into AccountHolder(AccountID, CustomerID, AccountType) values (55003, 115, 'Savings'), (44001, 101, 'Chequing'), (55006, 109, 'Savings'), (44002, 102, 'Chequing'), (44003, 113, 'Chequing'), (55007, 108, 'Savings'), (44004, 103, 'Chequing'), (44005, 110, 'Chequing'), (55005, 112, 'Savings'), (44006, 114, 'Chequing'), (55001, 111, 'Savings'), (44007, 107, 'Chequing'), (44008, 104, 'Chequing'), (55004, 106, 'Savings'), (44009, 105, 'Chequing'), (44010, 113, 'Chequing'), (55002, 107, 'Savings'), (44011, 110, 'Chequing'), (44012, 104, 'Chequing') select * from AccountHolder insert into Branch(LocationID, BranchName, Address, Type, DepositSum, LoanSum) values (1, 'Boulevard Branch', '3268 Wade Boulevard', 'Rural', 171848.88, 37681.72), (2, 'Avenue Branch', '4814 Dare Avenue', 'Rural', 232707.42, 68324.56), (3, 'Street Branch', '208 Ferry Street', 'Commercial', 375010.75, 44665.08), (4, 'Road Branch', '468 Zulauf Road', 'Commercial', 496001.41, 521095.11), (5, 'Way Branch', '728 Rutherford Way', 'Foreign', 827918.63, 240953.61), (2, 'Circle Branch', '4967 Schaefer Circle', 'Foreign', 975443.59, 342552.69), (2, 'Drive Branch', '8986 Huels Drive', 'Central', 1856935.98, 850457.51) select * from Branch insert into ChequingAccount(Balance, LastAccessedDate) values (-213, '2023-11-19'), (13910, '2023-01-28'), (13457, '2023-07-31'), (-183, '2023-07-03'), (-206, '2023-08-22'), (18758, '2023-11-24'), (-673, '2023-02-10'), (-112, '2023-01-27'), (9947, '2023-08-06'), (11426, '2023-11-10'), (11780, '2023-07-15'), (11100, '2023-02-06') select * from ChequingAccount insert into Customer(FullName, Address, UserAccountID) values ('Troy Rojas', '6566 Chelsey Branch', 23001), ('Alex Baxter', '67947 Cremin Club', 23002), ('Roisin Johns', '2884 Maria Drive', 23003), ('Camilla Sanford', '118 Mohr Freeway', 23004), ('Bridget Cook', '244 Mabel Lodge', 23005), ('Phoenix Galvan', '968 Moore Curve', 23006), ('Connie Kidd', '553 Erwin Centers', 23007), ('Robyn Allison', '5463 Luciano Route', 23008), ('Barnaby Rivas', '2774 Paula Court', 23009), ('Kitty Pruitt', '8993 Tianna Harbor', 23010), ('Shawn Olsen', '650 Jabari Gateway', 23011), ('Shannon Lambert', '5186 Kemmer Crest', 23012), ('Conor Zimmerman', '02474 Zaria Light', 23013), ('Clarence Stark', '1910 Kavon Plains', 23014), ('Abdur Hendrix', '37442 Fausto Crescent', 23015) select * from Customer insert into CustomerAssignment(CustomerID, EmployeeID) values (101, 224), (102, 224), (103, 227), (104, 228), (105, 222), (106, 229), (107, 227), (108, 228), (109, 222), (110, 230), (111, 229), (112, 221), (113, 225), (114, 222), (115, 228) select * from CustomerAssignment insert into Employee(BranchID, StartDate, ManagerID, FullName) values (76, '2019-08-30', 226, 'Tomasz Alvarez'), (72, '2023-04-29', 226, 'Mercedes Luna'), (74, '2021-05-10', 226, 'Catherine Meyer'), (71, '2022-06-03', 226, 'Maddison Vega'), (75, '2019-10-13', 226, 'Aadam Dorsey'), (77, '2020-02-07', null, 'Pauline Friedman'), --Main manager or CEO I guess (77, '2022-10-30', 226, 'Wojciech Rangel'), (73, '2019-01-21', 226, 'Ida Owen'), (76, '2018-09-21', 221, 'Brogan Fischer'), (77, '2019-11-03', 226, 'Ilyas Foley') select * from Employee insert into Loan(EmployeeID, BranchID, Amount, DateIssued, DateDue) values (222, 77, 39314.13, '2022-04-16', '2035-10-16'), (221, 74, 28953.40, '2018-05-25', '2024-05-25'), (223, 73, 12551.46, '2022-12-05', '2022-12-05'), (222, 75, 13633.33, '2019-03-15', '2024-03-15'), (221, 76, 9465.58, '2021-03-09', '2024-01-09'), (230, 72, 3556.22, '2022-09-17', '2023-11-03'), (226, 76, 6391.70, '2021-05-28', '2024-05-28'), (228, 76, 23578.08, '2021-07-22', '2032-07-22'), (226, 77, 29575.75, '2020-06-22', '2029-06-22'), (228, 72, 3682.09, '2022-10-06', '2023-12-06'), (225, 74, 23980.98, '2020-03-18', '2026-03-18'), (221, 75, 34174.15, '2018-05-15', '2029-05-15'), (226, 73, 24204.47, '2021-01-29', '2031-06-29'), (228, 76, 12778.85, '2023-04-27', '2023-04-27'), (230, 77, 38414.50, '2020-02-07', '2030-05-07'), (228, 77, 5152.04, '2019-07-16', '2024-12-16'), (227, 74, 10722.37, '2020-07-18', '2025-07-18'), (230, 75, 18942.55, '2020-02-23', '2026-08-23'), (222, 77, 16476.40, '2021-09-22', '2027-09-22'), (224, 75, 11130.68, '2020-12-15', '2026-02-15') select * from Loan Create at least 10 Queries for this Database in a stored procedure or user-defined function format.

Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter5: Database Systems And Applications
Section: Chapter Questions
Problem 11SAT
icon
Related questions
Question

In Sql

These are some database from a set of tables

insert into AccountHolder(AccountID, CustomerID, AccountType)
values

(55003, 115, 'Savings'),
(44001, 101, 'Chequing'),
(55006, 109, 'Savings'),
(44002, 102, 'Chequing'),
(44003, 113, 'Chequing'),
(55007, 108, 'Savings'),
(44004, 103, 'Chequing'),
(44005, 110, 'Chequing'),
(55005, 112, 'Savings'),
(44006, 114, 'Chequing'),
(55001, 111, 'Savings'),
(44007, 107, 'Chequing'),
(44008, 104, 'Chequing'),
(55004, 106, 'Savings'),
(44009, 105, 'Chequing'),
(44010, 113, 'Chequing'),
(55002, 107, 'Savings'),
(44011, 110, 'Chequing'),
(44012, 104, 'Chequing')

select * from AccountHolder

insert into Branch(LocationID, BranchName, Address, Type, DepositSum, LoanSum)
values

(1, 'Boulevard Branch', '3268 Wade Boulevard', 'Rural', 171848.88, 37681.72),
(2, 'Avenue Branch', '4814 Dare Avenue', 'Rural', 232707.42, 68324.56),
(3, 'Street Branch', '208 Ferry Street', 'Commercial', 375010.75, 44665.08),
(4, 'Road Branch', '468 Zulauf Road', 'Commercial', 496001.41, 521095.11),
(5, 'Way Branch', '728 Rutherford Way', 'Foreign', 827918.63, 240953.61),
(2, 'Circle Branch', '4967 Schaefer Circle', 'Foreign', 975443.59, 342552.69),
(2, 'Drive Branch', '8986 Huels Drive', 'Central', 1856935.98, 850457.51)

select * from Branch

insert into ChequingAccount(Balance, LastAccessedDate)
values

(-213, '2023-11-19'),
(13910, '2023-01-28'),
(13457, '2023-07-31'),
(-183, '2023-07-03'),
(-206, '2023-08-22'),
(18758, '2023-11-24'),
(-673, '2023-02-10'),
(-112, '2023-01-27'),
(9947, '2023-08-06'),
(11426, '2023-11-10'),
(11780, '2023-07-15'),
(11100, '2023-02-06')

select * from ChequingAccount

insert into Customer(FullName, Address, UserAccountID)
values

('Troy Rojas', '6566 Chelsey Branch', 23001),
('Alex Baxter', '67947 Cremin Club', 23002),
('Roisin Johns', '2884 Maria Drive', 23003),
('Camilla Sanford', '118 Mohr Freeway', 23004),
('Bridget Cook', '244 Mabel Lodge', 23005),
('Phoenix Galvan', '968 Moore Curve', 23006),
('Connie Kidd', '553 Erwin Centers', 23007),
('Robyn Allison', '5463 Luciano Route', 23008),
('Barnaby Rivas', '2774 Paula Court', 23009),
('Kitty Pruitt', '8993 Tianna Harbor', 23010),
('Shawn Olsen', '650 Jabari Gateway', 23011),
('Shannon Lambert', '5186 Kemmer Crest', 23012),
('Conor Zimmerman', '02474 Zaria Light', 23013),
('Clarence Stark', '1910 Kavon Plains', 23014),
('Abdur Hendrix', '37442 Fausto Crescent', 23015)

select * from Customer

insert into CustomerAssignment(CustomerID, EmployeeID)
values

(101, 224),
(102, 224),
(103, 227),
(104, 228),
(105, 222),
(106, 229),
(107, 227),
(108, 228),
(109, 222),
(110, 230),
(111, 229),
(112, 221),
(113, 225),
(114, 222),
(115, 228)

select * from CustomerAssignment

insert into Employee(BranchID, StartDate, ManagerID, FullName)
values

(76, '2019-08-30', 226, 'Tomasz Alvarez'),
(72, '2023-04-29', 226, 'Mercedes Luna'),
(74, '2021-05-10', 226, 'Catherine Meyer'),
(71, '2022-06-03', 226, 'Maddison Vega'),
(75, '2019-10-13', 226, 'Aadam Dorsey'),
(77, '2020-02-07', null, 'Pauline Friedman'), --Main manager or CEO I guess
(77, '2022-10-30', 226, 'Wojciech Rangel'),
(73, '2019-01-21', 226, 'Ida Owen'),
(76, '2018-09-21', 221, 'Brogan Fischer'),
(77, '2019-11-03', 226, 'Ilyas Foley')

select * from Employee

insert into Loan(EmployeeID, BranchID, Amount, DateIssued, DateDue)
values

(222, 77, 39314.13, '2022-04-16', '2035-10-16'),
(221, 74, 28953.40, '2018-05-25', '2024-05-25'),
(223, 73, 12551.46, '2022-12-05', '2022-12-05'),
(222, 75, 13633.33, '2019-03-15', '2024-03-15'),
(221, 76, 9465.58, '2021-03-09', '2024-01-09'),
(230, 72, 3556.22, '2022-09-17', '2023-11-03'),
(226, 76, 6391.70, '2021-05-28', '2024-05-28'),
(228, 76, 23578.08, '2021-07-22', '2032-07-22'),
(226, 77, 29575.75, '2020-06-22', '2029-06-22'),
(228, 72, 3682.09, '2022-10-06', '2023-12-06'),
(225, 74, 23980.98, '2020-03-18', '2026-03-18'),
(221, 75, 34174.15, '2018-05-15', '2029-05-15'),
(226, 73, 24204.47, '2021-01-29', '2031-06-29'),
(228, 76, 12778.85, '2023-04-27', '2023-04-27'),
(230, 77, 38414.50, '2020-02-07', '2030-05-07'),
(228, 77, 5152.04, '2019-07-16', '2024-12-16'),
(227, 74, 10722.37, '2020-07-18', '2025-07-18'),
(230, 75, 18942.55, '2020-02-23', '2026-08-23'),
(222, 77, 16476.40, '2021-09-22', '2027-09-22'),
(224, 75, 11130.68, '2020-12-15', '2026-02-15')

select * from Loan

Create at least 10 Queries for this Database in a stored procedure or user-defined function format.

Expert Solution
steps

Step by step

Solved in 5 steps

Blurred answer
Knowledge Booster
Dataset
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr