set search_path TO bank;

call add_bank('Banque de l''Est');
insert into currency values ('EUR'),('YEN'),('USD');

call add_account(1,'EUR');
call add_account(1,'YEN');
call add_account(1,'USD');

update account set balance = 100000 where id = 1;
update account set balance = 50000 where id = 2;
update account set balance = 200000 where id = 3;

call add_person('Albane','Trottier', '1990-01-01', array['USD']);
call add_person('Josef','Jakubowski', '1990-01-01',array['EUR', 'EUR']);
call add_person('Ali','Sahim', '1990-01-01', array['EUR']);
call add_person('Émilie','Jolie', '1990-01-01', array['EUR']);
call add_person('Soufiane','Mamoun', '1990-01-01',array['EUR', 'EUR']);
call add_person('Élodie','Bérengier', '1990-01-01',array['EUR', 'EUR']);
call add_person('Eugène','Makiadi', '1990-01-01', array['EUR']);
call add_person('Julie','Thomis', '1990-01-01',array['EUR', 'EUR', 'EUR']);
call add_person('Marc','Aurèle', '1990-01-01',array['USD', 'EUR', 'EUR']);
call add_person('Albert','Unepierre', '1990-01-01', array['EUR']);
call add_person('Lucas','George', '1990-01-01', array['EUR']);
call add_person('Lyna','Khoudri', '1990-01-01',array['EUR', 'USD']);
call add_person('Nour','Zermani', '1990-01-01', array['USD']);
call add_person('Théophile','M''Beko', '1990-01-01',array['EUR', 'USD']);
call add_person('Sébastien','Voltier', '1990-01-01', array['EUR']);
call add_person('Matteo','Giordano', '1990-01-01',array['EUR', 'USD']);
call add_person('Diego','Delavega', '1990-01-01',array['EUR', 'EUR', 'EUR']);
call add_person('Geoffrey','Lebowski', '1990-01-01',array['EUR', 'EUR', 'EUR']);
call add_person('Ælita','Dornburg', '1990-01-01',array['EUR', 'USD']);
call add_person('João','Costa', '1990-01-01',array['EUR']);
call add_person('Maëla','Le Roux', '1990-01-01',array['EUR']);
call add_person('Rose-Lynn','Noël', '1990-01-01',array['EUR']);
call add_person('Jean-Christophe','Prigent', '1990-01-01',array['EUR','USD']);
call add_person('Apolline','de Bazelaire de Lesseux', '1990-01-01',array['EUR']);
call add_person('Aylin','Özkan', '1990-01-01',array['EUR', 'EUR', 'EUR']);
call add_person('Yana','Zhdanova', '1988-02-28',array['EUR', 'EUR']);
call add_person('Nayiri','Zakarian', '1990-01-01',array['EUR', 'EUR']);
call add_person('François','du Bessey de Contenson', '1990-01-01', array['USD', 'EUR', 'EUR']);
call add_person('Martial','Mondésir', '1990-01-01', array['EUR', 'EUR', 'EUR']);
call add_person('Tom','Kishida', '1990-01-01',array['EUR', 'EUR']);
call add_person('Zainap','Bisliev', '1990-01-01',array['EUR']);
call add_person('Maï Ly','Pham Le', '1990-01-01',array['EUR', 'EUR']);
call add_person('Laurent','Ramasawmy', '1990-01-01',array['EUR']);
call add_person('Atika','Mroudjaé', '1990-01-01',array['EUR', 'EUR', 'EUR']);
call add_person('Alice','Inechains', '1987-07-07',array['EUR']);
call add_person('Laureline','Mézières', '1990-01-01',array['EUR', 'USD']);
call add_person('Valerian','Christin', '1990-01-01',array['EUR', 'EUR', 'USD']);
call add_person('Alice','Kingsleigh', '1990-01-01',array['EUR', 'USD', 'EUR']);
call add_person('Amélie','Pond', '1990-01-01',array['EUR', 'EUR', 'EUR']);
call add_person('Eyota','Olmsted', '1990-01-01',array['EUR', 'EUR']);
call add_person('Hapsatou','Sall','1990-01-01');
call add_person('Arthur','Koblenz','1990-01-01');
call add_person('Ellen Louise','Ripley','1990-01-01');

call transfer(42,63,239,'2025-01-05');
call transfer(47,40,128,'2025-03-02');
call transfer(31,73,185,'2025-01-21');
call transfer(63,9,1100,'2025-07-13');
call transfer(17,61,348,'2025-05-20');
call transfer(34,68,876,'2025-06-04');
call transfer(28,70,1504,'2025-07-12');
call transfer(26,40,1385,'2025-04-12');
call transfer(48,57,934,'2025-05-12');
call transfer(16,32,141,'2025-02-27');
call transfer(44,3,1144,'2025-05-30');
call transfer(30,76,24,'2025-02-26');
call transfer(10,8,148,'2025-02-28');
call transfer(5,43,1062,'2025-01-19');
call transfer(31,36,1004,'2025-06-20');
call transfer(28,70,1491,'2025-02-03');
call transfer(74,61,1616,'2025-03-03');
call transfer(61,53,203,'2025-02-18');
call transfer(13,56,877,'2025-03-31');
call transfer(53,60,120,'2025-07-05');
call transfer(13,8,1501,'2025-04-13');
call transfer(44,14,402,'2025-03-04');
call transfer(25,69,297,'2025-04-24');
call transfer(55,24,957,'2025-03-12');
call transfer(32,10,1664,'2025-04-23');
call transfer(71,13,1345,'2025-01-13');
call transfer(70,2,1907,'2025-01-24');
call transfer(31,22,1004,'2025-04-14');
call transfer(62,28,1858,'2025-04-12');
call transfer(8,22,14,'2025-04-07');
call transfer(50,34,1617,'2025-07-19');
call transfer(59,37,1436,'2025-04-18');
call transfer(72,63,398,'2025-02-09');
call transfer(38,28,1196,'2025-01-15');
call transfer(70,8,652,'2025-07-10');
call transfer(8,7,986,'2025-05-29');
call transfer(65,68,126,'2025-02-10');
call transfer(66,11,150,'2025-02-17');
call transfer(9,31,255,'2025-04-13');
call transfer(73,32,1227,'2025-05-28');
call transfer(6,11,1356,'2025-04-17');
call transfer(75,73,657,'2025-05-13');
call transfer(34,27,1476,'2025-06-20');
call transfer(41,31,820,'2025-03-08');
call transfer(17,39,657,'2025-04-27');
call transfer(10,2,1282,'2025-04-27');
call transfer(73,13,1111,'2025-01-19');
call transfer(28,65,281,'2025-03-08');
call transfer(45,9,766,'2025-03-03');
call transfer(37,21,1717,'2025-04-22');
call transfer(70,39,1662,'2025-06-05');
call transfer(68,2,1683,'2025-06-19');
call transfer(71,39,222,'2025-06-18');
call transfer(18,34,1832,'2025-01-30');
call transfer(14,71,567,'2025-02-09');
call transfer(37,27,712,'2025-07-02');
call transfer(27,34,1010,'2025-05-09');
call transfer(33,7,1309,'2025-01-24');
call transfer(55,36,17,'2025-01-12');
call transfer(43,17,546,'2025-06-12');
call transfer(21,57,1455,'2025-05-21');
call transfer(55,72,239,'2025-01-03');
call transfer(10,20,83,'2025-05-19');
call transfer(48,75,313,'2025-05-21');
call transfer(56,17,641,'2025-01-11');
call transfer(47,6,440,'2025-04-01');
call transfer(32,14,1607,'2025-03-31');
call transfer(72,53,1544,'2025-06-07');
call transfer(20,31,1648,'2025-02-11');
call transfer(23,53,377,'2025-01-07');
call transfer(43,53,1779,'2025-06-20');
call transfer(32,35,1622,'2025-02-10');
call transfer(14,49,1768,'2025-01-10');
call transfer(61,29,1682,'2025-02-21');
call transfer(59,45,1690,'2025-03-19');
call transfer(30,29,1361,'2025-01-07');
call transfer(25,52,580,'2025-03-25');
call transfer(9,36,1323,'2025-03-30');
call transfer(66,52,1737,'2025-06-22');
call transfer(69,43,246,'2025-01-08');
call transfer(34,23,1981,'2025-05-28');
call transfer(34,5,1231,'2025-01-28');
call transfer(56,45,1620,'2025-07-05');
call transfer(41,56,1057,'2025-06-04');
call transfer(15,50,399,'2025-05-27');
call transfer(33,6,903,'2025-06-30');
call transfer(1,67,1416,'2025-05-17');
call transfer(26,47,153,'2025-04-20');
call transfer(43,41,1746,'2025-06-18');
call transfer(16,39,643,'2025-05-09');
call transfer(53,42,1437,'2025-04-13');
call transfer(38,71,402,'2025-02-02');
call transfer(54,49,1542,'2025-06-22');
call transfer(23,73,841,'2025-03-18');
call transfer(71,1,597,'2025-03-18');
call transfer(27,56,1252,'2025-05-28');
call transfer(42,60,915,'2025-04-23');
call transfer(28,66,1635,'2025-05-01');
call transfer(22,11,1065,'2025-03-13');
call transfer(43,12,491,'2025-07-11');
call transfer(40,29,311,'2025-02-20');
call transfer(4,6,983,'2025-03-03');
call transfer(10,59,1824,'2025-04-16');
call transfer(74,25,1436,'2025-07-02');
call transfer(50,64,509,'2025-04-12');
call transfer(19,1,1772,'2025-07-11');
call transfer(14,55,370,'2025-02-26');
call transfer(67,60,1151,'2025-01-13');
call transfer(32,16,283,'2025-04-26');
call transfer(60,68,1229,'2025-05-23');
call transfer(41,57,1679,'2025-06-05');
call transfer(65,55,923,'2025-05-20');
call transfer(21,61,540,'2025-04-25');
call transfer(32,36,1602,'2025-07-15');
call transfer(67,63,499,'2025-06-09');
call transfer(36,57,1471,'2025-01-20');
call transfer(37,31,697,'2025-03-10');
call transfer(41,70,293,'2025-01-21');
call transfer(20,30,1431,'2025-04-08');
call transfer(20,28,859,'2025-01-17');
call transfer(53,43,964,'2025-05-18');
call transfer(54,8,1715,'2025-02-22');
call transfer(54,50,1206,'2025-07-16');
call transfer(3,74,986,'2025-04-07');
call transfer(1,46,1553,'2025-03-17');
call transfer(50,54,1540,'2025-05-17');
call transfer(70,29,459,'2025-05-04');
call transfer(35,56,69,'2025-05-04');
call transfer(50,44,1400,'2025-06-20');
call transfer(52,22,1893,'2025-04-29');
call transfer(17,69,1867,'2025-01-07');
call transfer(51,76,1367,'2025-05-24');
call transfer(4,11,887,'2025-06-13');
call transfer(18,60,112,'2025-02-16');
call transfer(34,49,443,'2025-03-24');
call transfer(59,42,1568,'2025-03-27');
call transfer(49,36,1958,'2025-07-11');
call transfer(54,33,973,'2025-01-21');
call transfer(3,70,1959,'2025-01-14');
call transfer(45,29,150,'2025-06-15');
call transfer(6,4,418,'2025-03-04');
call transfer(3,20,268,'2025-03-02');
call transfer(61,15,1951,'2025-05-24');
call transfer(28,60,534,'2025-06-28');
call transfer(48,22,1253,'2025-06-04');
call transfer(15,21,231,'2025-03-20');
call transfer(75,4,1189,'2025-03-20');
call transfer(49,51,416,'2025-07-02');
call transfer(10,76,1711,'2025-06-25');
call transfer(32,14,1592,'2025-06-27');
call transfer(39,16,1612,'2025-05-24');
call transfer(6,45,887,'2025-05-16');
call transfer(48,9,1336,'2025-05-09');
call transfer(44,2,1694,'2025-04-17');
call transfer(63,14,1977,'2025-04-20');
call transfer(47,59,323,'2025-06-30');
call transfer(56,23,1078,'2025-07-06');
call transfer(35,69,1000,'2025-07-17');
call transfer(60,56,1223,'2025-07-06');
call transfer(35,42,1711,'2025-03-03');
call transfer(12,36,509,'2025-04-25');
call transfer(60,73,1378,'2025-06-05');
call transfer(49,44,1022,'2025-01-08');
call transfer(42,24,444,'2025-05-04');
call transfer(46,34,582,'2025-03-28');
call transfer(36,72,1068,'2025-01-03');
call transfer(25,11,1484,'2025-03-02');
call transfer(53,63,1562,'2025-05-22');
call transfer(31,61,1467,'2025-06-14');
call transfer(63,58,200,'2025-01-05');
call transfer(38,29,1426,'2025-04-13');
call transfer(32,40,1201,'2025-06-18');
call transfer(48,61,1097,'2025-05-21');
call transfer(45,55,1137,'2025-07-09');
call transfer(43,46,939,'2025-06-28');
call transfer(35,40,482,'2025-03-05');
call transfer(16,25,254,'2025-03-21');
call transfer(69,24,453,'2025-02-19');
call transfer(62,36,1217,'2025-07-04');
call transfer(68,37,1715,'2025-01-26');
call transfer(25,38,749,'2025-02-28');
call transfer(23,39,1460,'2025-01-04');
call transfer(69,17,103,'2025-03-11');
call transfer(7,71,1438,'2025-03-15');
call transfer(17,63,1797,'2025-01-27');
call transfer(2,74,971,'2025-03-13');
call transfer(62,57,387,'2025-03-28');
call transfer(7,33,243,'2025-05-02');
call transfer(9,52,161,'2025-05-05');
call transfer(74,7,315,'2025-02-08');
call transfer(73,39,518,'2025-01-22');
call transfer(16,72,862,'2025-07-14');
call transfer(29,67,932,'2025-04-07');
call transfer(57,39,888,'2025-05-30');
call transfer(40,73,133,'2025-06-07');
call transfer(13,27,442,'2025-06-09');
call transfer(34,11,501,'2025-02-10');
call transfer(23,71,330,'2025-01-20');
call transfer(1,53,1421,'2025-04-25');
call transfer(61,38,484,'2025-01-09');
call transfer(37,59,1417,'2025-01-19');
call transfer(30,34,1217,'2025-06-09');
call transfer(26,55,1125,'2025-01-30');
call transfer(29,20,1702,'2025-03-09');
call transfer(19,10,349,'2025-01-16');
call transfer(40,73,909,'2025-03-14');
call transfer(16,60,632,'2025-06-25');
call transfer(52,35,1115,'2025-05-08');
call transfer(64,57,1234,'2025-01-21');
call transfer(6,56,670,'2025-07-07');
call transfer(33,4,478,'2025-01-24');
call transfer(74,76,1576,'2025-01-06');
call transfer(35,74,1572,'2025-01-11');
call transfer(23,61,1344,'2025-05-12');
call transfer(57,36,1208,'2025-02-16');
call transfer(56,63,972,'2025-01-24');
call transfer(45,53,667,'2025-03-26');
call transfer(14,21,853,'2025-03-25');
call transfer(64,37,1945,'2025-06-18');
call transfer(52,71,941,'2025-01-10');
call transfer(1,34,822,'2025-03-02');
call transfer(34,65,831,'2025-03-23');
call transfer(65,1,1493,'2025-03-05');
call transfer(23,65,913,'2025-05-28');
call transfer(65,14,1344,'2025-04-25');
call transfer(14,23,1173,'2025-02-20');
call transfer(39,65,973,'2025-04-29');
call transfer(65,26,555,'2025-04-12');
call transfer(26,39,1030,'2025-03-15');
call transfer(20,48,1137,'2025-04-06');
call transfer(48,21,1010,'2025-05-26');
call transfer(21,20,952,'2025-05-10');
call transfer(70,68,552,'2025-05-27');
call transfer(68,1,773,'2025-03-17');
call transfer(1,70,634,'2025-04-30');
