diff --git a/.coverage b/.coverage index 6849e4c..c14c141 100644 Binary files a/.coverage and b/.coverage differ diff --git a/AirlineSafetyDB.db b/AirlineSafetyDB.db index 220856c..bcb345b 100644 Binary files a/AirlineSafetyDB.db and b/AirlineSafetyDB.db differ diff --git a/__pycache__/test_main.cpython-310-pytest-7.1.3.pyc b/__pycache__/test_main.cpython-310-pytest-7.1.3.pyc index 2685271..59944cc 100644 Binary files a/__pycache__/test_main.cpython-310-pytest-7.1.3.pyc and b/__pycache__/test_main.cpython-310-pytest-7.1.3.pyc differ diff --git a/myLib/__pycache__/__init__.cpython-310.pyc b/myLib/__pycache__/__init__.cpython-310.pyc index 4e3ef1c..68f575c 100644 Binary files a/myLib/__pycache__/__init__.cpython-310.pyc and b/myLib/__pycache__/__init__.cpython-310.pyc differ diff --git a/myLib/__pycache__/extract.cpython-310.pyc b/myLib/__pycache__/extract.cpython-310.pyc index 8bae1a4..4bb31d9 100644 Binary files a/myLib/__pycache__/extract.cpython-310.pyc and b/myLib/__pycache__/extract.cpython-310.pyc differ diff --git a/myLib/__pycache__/query.cpython-310.pyc b/myLib/__pycache__/query.cpython-310.pyc index b208712..0b644ce 100644 Binary files a/myLib/__pycache__/query.cpython-310.pyc and b/myLib/__pycache__/query.cpython-310.pyc differ diff --git a/myLib/__pycache__/transform_load.cpython-310.pyc b/myLib/__pycache__/transform_load.cpython-310.pyc index 781b66b..0f2410f 100644 Binary files a/myLib/__pycache__/transform_load.cpython-310.pyc and b/myLib/__pycache__/transform_load.cpython-310.pyc differ diff --git a/query_log.md b/query_log.md index 1bcc730..c2ce94e 100644 --- a/query_log.md +++ b/query_log.md @@ -232,3 +232,57 @@ DELETE FROM AirlineSafety WHERE id=1; SELECT * FROM AirlineSafety WHERE airline = 'Aeroflot*' ``` +```sql +UPDATE AirlineSafety SET + airline=Updated Airline A, avail_seat_km_per_week=600000, + incidents_85_99=3, fatal_accidents_85_99=0, + fatalities_85_99=1, incidents_00_14=0, + fatal_accidents_00_14=1, fatalities_00_14=0 + WHERE id=1; +``` + +```sql +DELETE FROM AirlineSafety WHERE id=1; +``` + +```sql +INSERT INTO AirlineSafety VALUES ( + New Airline, 1000000, 2, 0, 0, + 1, 0, 0); +``` + +```sql +SELECT * FROM AirlineSafety WHERE airline = 'Aeroflot*' +``` + +```sql +SELECT * FROM AirlineSafety LIMIT 10; +``` + +```sql +INSERT INTO AirlineSafety VALUES ( + New Airline, 1000000, 2, 0, 0, + 1, 0, 0); +``` + +```sql +SELECT * FROM AirlineSafety LIMIT 10; +``` + +```sql +UPDATE AirlineSafety SET + airline=Updated Airline A, avail_seat_km_per_week=600000, + incidents_85_99=3, fatal_accidents_85_99=0, + fatalities_85_99=1, incidents_00_14=0, + fatal_accidents_00_14=1, fatalities_00_14=0 + WHERE id=1; +``` + +```sql +DELETE FROM AirlineSafety WHERE id=1; +``` + +```sql +SELECT * FROM AirlineSafety WHERE airline = 'Aeroflot*' +``` + diff --git a/query_output.md b/query_output.md index b20f68c..f010771 100644 --- a/query_output.md +++ b/query_output.md @@ -84,3 +84,51 @@ | 10 | Alitalia | 698012498 | 7 | 2 | 50 | 4 | 0 | 0 | +------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| id | airline | avail_seat_km_per_week | incidents_85_99 | fatal_accidents_85_99 | fatalities_85_99 | incidents_00_14 | fatal_accidents_00_14 | fatalities_00_14 | ++======+=======================+==========================+===================+=========================+====================+===================+=========================+====================+ +| 2 | Aeroflot* | 1197672318 | 76 | 14 | 128 | 6 | 1 | 88 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 3 | Aerolineas Argentinas | 385803648 | 6 | 0 | 0 | 1 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 4 | Aeromexico* | 596871813 | 3 | 1 | 64 | 5 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 5 | Air Canada | 1865253802 | 2 | 0 | 0 | 2 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 6 | Air France | 3004002661 | 14 | 4 | 79 | 6 | 2 | 337 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 7 | Air India* | 869253552 | 2 | 1 | 329 | 4 | 1 | 158 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 8 | Air New Zealand* | 710174817 | 3 | 0 | 0 | 5 | 1 | 7 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 9 | Alaska Airlines* | 965346773 | 5 | 0 | 0 | 5 | 1 | 88 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 10 | Alitalia | 698012498 | 7 | 2 | 50 | 4 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 11 | All Nippon Airways | 1841234177 | 3 | 1 | 1 | 7 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ + ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| id | airline | avail_seat_km_per_week | incidents_85_99 | fatal_accidents_85_99 | fatalities_85_99 | incidents_00_14 | fatal_accidents_00_14 | fatalities_00_14 | ++======+=======================+==========================+===================+=========================+====================+===================+=========================+====================+ +| 1 | Aer Lingus | 320906734 | 2 | 0 | 0 | 0 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 2 | Aeroflot* | 1197672318 | 76 | 14 | 128 | 6 | 1 | 88 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 3 | Aerolineas Argentinas | 385803648 | 6 | 0 | 0 | 1 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 4 | Aeromexico* | 596871813 | 3 | 1 | 64 | 5 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 5 | Air Canada | 1865253802 | 2 | 0 | 0 | 2 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 6 | Air France | 3004002661 | 14 | 4 | 79 | 6 | 2 | 337 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 7 | Air India* | 869253552 | 2 | 1 | 329 | 4 | 1 | 158 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 8 | Air New Zealand* | 710174817 | 3 | 0 | 0 | 5 | 1 | 7 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 9 | Alaska Airlines* | 965346773 | 5 | 0 | 0 | 5 | 1 | 88 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +| 10 | Alitalia | 698012498 | 7 | 2 | 50 | 4 | 0 | 0 | ++------+-----------------------+--------------------------+-------------------+-------------------------+--------------------+-------------------+-------------------------+--------------------+ +