chapter 5 & 6 completed

pull/789/head
uv012 3 days ago
parent bf84b17f93
commit 4aa4eb8e63

@ -0,0 +1,108 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "bb4281ad",
"metadata": {},
"source": [
"# Q1. all city names in the Cities table"
]
},
{
"cell_type": "markdown",
"id": "ccc16638-bad1-42e2-8004-f225c54cdcb5",
"metadata": {},
"source": [
"SELECT city\\\n",
"FROM Cities"
]
},
{
"cell_type": "markdown",
"id": "dcf23339-e7dd-483b-a043-9bbce4a167d7",
"metadata": {},
"source": [
"# Q2. all cities in Ireland in the Cities table"
]
},
{
"cell_type": "markdown",
"id": "26fe320e-1d2d-423e-9fcc-9e3db643fa96",
"metadata": {},
"source": [
"SELECT city\\\n",
"FROM Cities\\\n",
"WHERE country = 'Ireland'"
]
},
{
"cell_type": "markdown",
"id": "3ca1a291-8adb-4c76-9bec-1d7a67d697da",
"metadata": {},
"source": [
"# Q3. all airport names with their city and country"
]
},
{
"cell_type": "markdown",
"id": "0aa54aed-c41f-41e8-ba3e-a99fc9992fb0",
"metadata": {},
"source": [
"SELECT Airports.name, Cities.city, Cities.country\\\n",
"FROM Airports\\\n",
"INNER JOIN Cities\\\n",
"ON Cities.id = Airports.city_id"
]
},
{
"cell_type": "markdown",
"id": "e53bf50d-d4c3-4c1d-9a82-ad229e946bb4",
"metadata": {},
"source": [
"# Q4. all airports in London, United Kingdom"
]
},
{
"cell_type": "markdown",
"id": "99aca6e9-27c2-4422-be1b-4658e8309ac6",
"metadata": {},
"source": [
"SELECT Airports.name\\\n",
"FROM Airports\\\n",
"INNER JOIN Cities\\\n",
"ON Cities.id = Airports.city_id\\\n",
"WHERE Cities.city = 'London'\\\n",
"AND Cities.Country = 'United Kingdom',"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "81fa9a71-5bb2-4489-ad5e-fcdab7362ad2",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

@ -0,0 +1,171 @@
city
Belfast
Enniskillen
Londonderry
Birmingham
Coventry
Leicester
Golouchestershire
Halfpenny Green
Pailton
Turweston
Wellesbourne
Manchester
Woodfort
Chivenor
Newquai
Lyneham
Boscombe Down
Culdrose
St. Athan
Yeovilton
Haverfordwest
Cardiff
Swansea
Bristol
Liverpool
London
Plymouth
Bournemouth
Southampton
Lasham
Shoreham By Sea
Biggin Hill
Farnborough
Chalsgrove
Blackbushe
Southend
Lydd
Manston
Brough
Carlisle
Repton
Blackpool
Humberside
Barrow Island
Leeds
Warton
Hawarden
Newcastle
Teesside
East Midlands
Llanbedr
Ternhill
Shawbury
Woodvale
Kirkwall
Sumburgh
Wick
Aberdeen
Inverness
Glasgow
Edinburgh
Islay
Prestwick
Benbecula
Scatsta
Dundee
Stornoway
Tiree
Leuchars
Lossiemouth
Cambridge
Peterborough
Norwich
North Weald
Fowlmere
Cranfield
Exeter
Oxford
Benson
Lakenheath
Mildenhall
Wattisham
Wyton
Fairford
Brize Norton
Odiham
Cosford
Northolt
Coningsby
Dishforth
Leeming
Church Fenton
Honington
Cottesmore
Scampton
Wittering
Linton-on-ouse
Waddington
Topcliffe
Cranwell
Barkston Heath
Marham
Cork
Galway
Dublin
Connaught
Kerry
Casement
Shannon
Sligo
Waterford
Nottingham
Campbeltown
Eday
Fair Isle
North Ronaldsay
Papa Westray
Stronsay
Sanday
Lerwick
Westray
Penzance
Angelsey
Barra
Dongloe
Leixlip
Outer Skerries
Inis Mor
Indreabhan
Unst
North Connel
Isle Of Wight
Lympne
Inisheer
Inishmaan
Colonsay
Tresco
Maidenhead
Wycombe
Bembridge
Shaftesbury
Forties Alpha
Perth
Caernarfon
Bantry
Duxford
Fairoaks
Rochester
Rothera Research Station
Beccles
Brawdy
Redhill
Enstone
Elstree
Sandtoft
Popham
Shrewsbury
Burton-on-Trent
York
Shobdon
Newtownards
Headcorn
Panshanger
Thurrock
Stapleford
Goodwood
Spadeadam
Kinloss
Mona
Longwood
1 city
2 Belfast
3 Enniskillen
4 Londonderry
5 Birmingham
6 Coventry
7 Leicester
8 Golouchestershire
9 Halfpenny Green
10 Pailton
11 Turweston
12 Wellesbourne
13 Manchester
14 Woodfort
15 Chivenor
16 Newquai
17 Lyneham
18 Boscombe Down
19 Culdrose
20 St. Athan
21 Yeovilton
22 Haverfordwest
23 Cardiff
24 Swansea
25 Bristol
26 Liverpool
27 London
28 Plymouth
29 Bournemouth
30 Southampton
31 Lasham
32 Shoreham By Sea
33 Biggin Hill
34 Farnborough
35 Chalsgrove
36 Blackbushe
37 Southend
38 Lydd
39 Manston
40 Brough
41 Carlisle
42 Repton
43 Blackpool
44 Humberside
45 Barrow Island
46 Leeds
47 Warton
48 Hawarden
49 Newcastle
50 Teesside
51 East Midlands
52 Llanbedr
53 Ternhill
54 Shawbury
55 Woodvale
56 Kirkwall
57 Sumburgh
58 Wick
59 Aberdeen
60 Inverness
61 Glasgow
62 Edinburgh
63 Islay
64 Prestwick
65 Benbecula
66 Scatsta
67 Dundee
68 Stornoway
69 Tiree
70 Leuchars
71 Lossiemouth
72 Cambridge
73 Peterborough
74 Norwich
75 North Weald
76 Fowlmere
77 Cranfield
78 Exeter
79 Oxford
80 Benson
81 Lakenheath
82 Mildenhall
83 Wattisham
84 Wyton
85 Fairford
86 Brize Norton
87 Odiham
88 Cosford
89 Northolt
90 Coningsby
91 Dishforth
92 Leeming
93 Church Fenton
94 Honington
95 Cottesmore
96 Scampton
97 Wittering
98 Linton-on-ouse
99 Waddington
100 Topcliffe
101 Cranwell
102 Barkston Heath
103 Marham
104 Cork
105 Galway
106 Dublin
107 Connaught
108 Kerry
109 Casement
110 Shannon
111 Sligo
112 Waterford
113 Nottingham
114 Campbeltown
115 Eday
116 Fair Isle
117 North Ronaldsay
118 Papa Westray
119 Stronsay
120 Sanday
121 Lerwick
122 Westray
123 Penzance
124 Angelsey
125 Barra
126 Dongloe
127 Leixlip
128 Outer Skerries
129 Inis Mor
130 Indreabhan
131 Unst
132 North Connel
133 Isle Of Wight
134 Lympne
135 Inisheer
136 Inishmaan
137 Colonsay
138 Tresco
139 Maidenhead
140 Wycombe
141 Bembridge
142 Shaftesbury
143 Forties Alpha
144 Perth
145 Caernarfon
146 Bantry
147 Duxford
148 Fairoaks
149 Rochester
150 Rothera Research Station
151 Beccles
152 Brawdy
153 Redhill
154 Enstone
155 Elstree
156 Sandtoft
157 Popham
158 Shrewsbury
159 Burton-on-Trent
160 York
161 Shobdon
162 Newtownards
163 Headcorn
164 Panshanger
165 Thurrock
166 Stapleford
167 Goodwood
168 Spadeadam
169 Kinloss
170 Mona
171 Longwood

@ -0,0 +1,17 @@
city
Cork
Galway
Dublin
Connaught
Kerry
Casement
Shannon
Sligo
Waterford
Dongloe
Leixlip
Inis Mor
Indreabhan
Inisheer
Inishmaan
Bantry
1 city
2 Cork
3 Galway
4 Dublin
5 Connaught
6 Kerry
7 Casement
8 Shannon
9 Sligo
10 Waterford
11 Dongloe
12 Leixlip
13 Inis Mor
14 Indreabhan
15 Inisheer
16 Inishmaan
17 Bantry

File diff suppressed because it is too large Load Diff

@ -0,0 +1,182 @@
name
Belfast International Airport
St Angelo Airport
George Best Belfast City Airport
City of Derry Airport
Birmingham International Airport
Coventry Airport
Leicester Airport
Gloucestershire Airport
Wolverhampton Halfpenny Green Airport
Cotswold Airport
Turweston Airport
Wellesbourne Mountford Airport
Manchester Airport
Manchester Woodford Airport
Royal Marines Base Chivenor Airport
Newquay Cornwall Airport
RAF Lyneham
MoD Boscombe Down Airport
RNAS Culdrose
MoD St. Athan
RNAS Yeovilton
Haverfordwest Airport
Cardiff International Airport
Swansea Airport
Bristol Airport
Liverpool John Lennon Airport
London Luton Airport
Plymouth City Airport
Bournemouth Airport
Southampton Airport
Lasham Airport
Shoreham Airport
London Biggin Hill Airport
London Gatwick Airport
London City Airport
Farnborough Airport
Chalgrove Airport
Blackbushe Airport
London Heathrow Airport
Southend Airport
Lydd Airport
Kent International Airport
Brough Airport
Carlisle Airport
Retford Gamston Airport
Blackpool International Airport
Humberside Airport
Barrow Walney Island Airport
Leeds Bradford Airport
Warton Airport
Hawarden Airport
Newcastle Airport
Durham Tees Valley Airport
East Midlands Airport
Llanbedr Airport
RAF Ternhill
RAF Shawbury
RAF Woodvale
Kirkwall Airport
Sumburgh Airport
Wick Airport
Aberdeen Dyce Airport
Inverness Airport
Glasgow International Airport
Edinburgh Airport
Islay Airport
Glasgow Prestwick Airport
Benbecula Airport
Scatsta Airport
Dundee Airport
Stornoway Airport
Tiree Airport
RAF Leuchars
RAF Lossiemouth
Cambridge Airport
Peterborough Business Airport
Norwich International Airport
London Stansted Airport
North Weald Airport
Sheffield City Heliport
Cranfield Airport
Exeter International Airport
Bristol Filton Airport
Oxford (Kidlington) Airport
RAF Benson
RAF Lakenheath
RAF Mildenhall
RAF Wattisham
RAF Wyton
RAF Fairford
RAF Brize Norton
RAF Odiham
DCAE Cosford Air Base
RAF Northolt
RAF Coningsby
RAF Dishforth
Leeming Airport
Leeds East Airport
RAF Honington
RAF Cottesmore
RAF Scampton
RAF Wittering
RAF Linton-On-Ouse
RAF Waddington
RAF Topcliffe
RAF Cranwell
RAF Barkston Heath
RAF Marham
Cork Airport
Galway Airport
Dublin Airport
Ireland West Knock Airport
Kerry Airport
Casement Air Base
Shannon Airport
Sligo Airport
Waterford Airport
Nottingham Airport
Campbeltown Airport
Eday Airport
Fair Isle Airport
North Ronaldsay Airport
Papa Westray Airport
Stronsay Airport
Sanday Airport
Lerwick / Tingwall Airport
Westray Airport
Penzance Heliport
Anglesey Airport
Barra Airport
Donegal Airport
Weston Airport
Outer Skerries Airport
Inishmore Aerodrome
Connemara Regional Airport
Unst Airport
Oban Airport
Isle of Wight / Sandown Airport
Lympne Airport
Inisheer Aerodrome
Inishmaan Aerodrome
Colonsay Airstrip
Tresco Heliport
London Heliport
White Waltham Airfield
Wycombe Air Park
Bembridge Airport
Compton Abbas Aerodrome
Glasgow City Heliport
Orlampa Inc Airport
Perth/Scone Airport
Caernarfon Airport
Newcastle Aerodrome
Bantry Aerodrome
Duxford Aerodrome
Fairoaks Airport
Rochester Airport
Rothera Research Station
Beccles Airport
RAF Brawdy
Redhill Aerodrome
Enstone Aerodrome
Elstree Airfield
Sandtoft Airfield
Popham Airfield
City Airport Manchester
Sleap Airport
Tatenhill Airfield
Full Sutton Airfield
Sherburn-In-Elmet Airfield
Shobdon Aerodrome
Newtownards Airport
Lashenden (Headcorn) Airfield
Panshanger Aerodrome
Thurrock Airfield
Stapleford Aerodrome
Chichester/Goodwood Airport
RAF Spadeadam
RAF Kinloss
RAF Mona
St. Helena Airport
1 name
2 Belfast International Airport
3 St Angelo Airport
4 George Best Belfast City Airport
5 City of Derry Airport
6 Birmingham International Airport
7 Coventry Airport
8 Leicester Airport
9 Gloucestershire Airport
10 Wolverhampton Halfpenny Green Airport
11 Cotswold Airport
12 Turweston Airport
13 Wellesbourne Mountford Airport
14 Manchester Airport
15 Manchester Woodford Airport
16 Royal Marines Base Chivenor Airport
17 Newquay Cornwall Airport
18 RAF Lyneham
19 MoD Boscombe Down Airport
20 RNAS Culdrose
21 MoD St. Athan
22 RNAS Yeovilton
23 Haverfordwest Airport
24 Cardiff International Airport
25 Swansea Airport
26 Bristol Airport
27 Liverpool John Lennon Airport
28 London Luton Airport
29 Plymouth City Airport
30 Bournemouth Airport
31 Southampton Airport
32 Lasham Airport
33 Shoreham Airport
34 London Biggin Hill Airport
35 London Gatwick Airport
36 London City Airport
37 Farnborough Airport
38 Chalgrove Airport
39 Blackbushe Airport
40 London Heathrow Airport
41 Southend Airport
42 Lydd Airport
43 Kent International Airport
44 Brough Airport
45 Carlisle Airport
46 Retford Gamston Airport
47 Blackpool International Airport
48 Humberside Airport
49 Barrow Walney Island Airport
50 Leeds Bradford Airport
51 Warton Airport
52 Hawarden Airport
53 Newcastle Airport
54 Durham Tees Valley Airport
55 East Midlands Airport
56 Llanbedr Airport
57 RAF Ternhill
58 RAF Shawbury
59 RAF Woodvale
60 Kirkwall Airport
61 Sumburgh Airport
62 Wick Airport
63 Aberdeen Dyce Airport
64 Inverness Airport
65 Glasgow International Airport
66 Edinburgh Airport
67 Islay Airport
68 Glasgow Prestwick Airport
69 Benbecula Airport
70 Scatsta Airport
71 Dundee Airport
72 Stornoway Airport
73 Tiree Airport
74 RAF Leuchars
75 RAF Lossiemouth
76 Cambridge Airport
77 Peterborough Business Airport
78 Norwich International Airport
79 London Stansted Airport
80 North Weald Airport
81 Sheffield City Heliport
82 Cranfield Airport
83 Exeter International Airport
84 Bristol Filton Airport
85 Oxford (Kidlington) Airport
86 RAF Benson
87 RAF Lakenheath
88 RAF Mildenhall
89 RAF Wattisham
90 RAF Wyton
91 RAF Fairford
92 RAF Brize Norton
93 RAF Odiham
94 DCAE Cosford Air Base
95 RAF Northolt
96 RAF Coningsby
97 RAF Dishforth
98 Leeming Airport
99 Leeds East Airport
100 RAF Honington
101 RAF Cottesmore
102 RAF Scampton
103 RAF Wittering
104 RAF Linton-On-Ouse
105 RAF Waddington
106 RAF Topcliffe
107 RAF Cranwell
108 RAF Barkston Heath
109 RAF Marham
110 Cork Airport
111 Galway Airport
112 Dublin Airport
113 Ireland West Knock Airport
114 Kerry Airport
115 Casement Air Base
116 Shannon Airport
117 Sligo Airport
118 Waterford Airport
119 Nottingham Airport
120 Campbeltown Airport
121 Eday Airport
122 Fair Isle Airport
123 North Ronaldsay Airport
124 Papa Westray Airport
125 Stronsay Airport
126 Sanday Airport
127 Lerwick / Tingwall Airport
128 Westray Airport
129 Penzance Heliport
130 Anglesey Airport
131 Barra Airport
132 Donegal Airport
133 Weston Airport
134 Outer Skerries Airport
135 Inishmore Aerodrome
136 Connemara Regional Airport
137 Unst Airport
138 Oban Airport
139 Isle of Wight / Sandown Airport
140 Lympne Airport
141 Inisheer Aerodrome
142 Inishmaan Aerodrome
143 Colonsay Airstrip
144 Tresco Heliport
145 London Heliport
146 White Waltham Airfield
147 Wycombe Air Park
148 Bembridge Airport
149 Compton Abbas Aerodrome
150 Glasgow City Heliport
151 Orlampa Inc Airport
152 Perth/Scone Airport
153 Caernarfon Airport
154 Newcastle Aerodrome
155 Bantry Aerodrome
156 Duxford Aerodrome
157 Fairoaks Airport
158 Rochester Airport
159 Rothera Research Station
160 Beccles Airport
161 RAF Brawdy
162 Redhill Aerodrome
163 Enstone Aerodrome
164 Elstree Airfield
165 Sandtoft Airfield
166 Popham Airfield
167 City Airport Manchester
168 Sleap Airport
169 Tatenhill Airfield
170 Full Sutton Airfield
171 Sherburn-In-Elmet Airfield
172 Shobdon Aerodrome
173 Newtownards Airport
174 Lashenden (Headcorn) Airfield
175 Panshanger Aerodrome
176 Thurrock Airfield
177 Stapleford Aerodrome
178 Chichester/Goodwood Airport
179 RAF Spadeadam
180 RAF Kinloss
181 RAF Mona
182 St. Helena Airport

@ -0,0 +1,134 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "82f08ef0",
"metadata": {},
"source": [
"## Q1. List all the tables in the db"
]
},
{
"cell_type": "markdown",
"id": "fd29416d-0221-4047-9b2d-4a012cd184c0",
"metadata": {},
"source": [
"SELECT name\\\n",
"FROM sqlite_master\\\n",
"WHERE type='table'\\\n",
"AND name\\\n",
"NOT LIKE 'sqlite_%'"
]
},
{
"cell_type": "markdown",
"id": "4ef19ecc-81f9-41f9-9889-914368a33d96",
"metadata": {},
"source": [
"- dept\n",
"- emp\n",
"- proj"
]
},
{
"cell_type": "markdown",
"id": "7b63ac95-7664-4dc5-88ac-f77935091fab",
"metadata": {},
"source": [
"## Q2. dept table_info"
]
},
{
"cell_type": "markdown",
"id": "2ca49b91-528b-4902-ad65-c3fc181faca7",
"metadata": {},
"source": [
"PRAGMA table_info(dept)"
]
},
{
"cell_type": "markdown",
"id": "91fab8d2-ce8c-4651-af24-d93f1913783c",
"metadata": {},
"source": [
"## Q3. emp table_info"
]
},
{
"cell_type": "markdown",
"id": "5b0132dd-ba43-429e-acc9-f1a5ae7e2b1b",
"metadata": {},
"source": [
"PRAGMA table_info(emp)"
]
},
{
"cell_type": "markdown",
"id": "f8b71a48-0a18-4197-aee5-f2d7f22d65a5",
"metadata": {},
"source": [
"## Q4. proj table_info"
]
},
{
"cell_type": "markdown",
"id": "a966aa66-0f31-457f-a64e-854e894e9eed",
"metadata": {},
"source": [
"PRAGMA table_info(proj)"
]
},
{
"cell_type": "markdown",
"id": "7d534edf-37b4-409a-b778-b9d0e9e67cd9",
"metadata": {},
"source": [
"## Q5. Create a table with emp.ENAME, dept.DNAME, proj.PROJID, Managers.Manager"
]
},
{
"cell_type": "markdown",
"id": "afa75542-3fdb-4c0f-bd92-3c8fbbdbb56c",
"metadata": {},
"source": [
"SELECT emp.ENAME, dept.DNAME, proj.PROJID, Managers.Manager\\\n",
"FROM dept\\\n",
"INNER JOIN emp\\\n",
" on dept.DEPTNO = emp.DEPTNO\\\n",
"INNER JOIN proj\\\n",
" ON emp.EMPNO = proj.EMPNO\\\n",
"INNER JOIN Managers\\\n",
" ON Managers.Employee = emp.ENAME"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1514a0b2-97e6-4910-89a4-1292c4c24944",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

@ -0,0 +1,5 @@
name
dept
emp
proj
datatypes
1 name
2 dept
3 emp
4 proj
5 datatypes

@ -0,0 +1,4 @@
cid,name,type,notnull,dflt_value,pk
0,DEPTNO,integer,1,NULL,1
1,DNAME,varchar(20),1,NULL,0
2,LOC,varchar(20),1,NULL,0
1 cid name type notnull dflt_value pk
2 0 DEPTNO integer 1 NULL 1
3 1 DNAME varchar(20) 1 NULL 0
4 2 LOC varchar(20) 1 NULL 0

@ -0,0 +1,9 @@
cid,name,type,notnull,dflt_value,pk
0,EMPNO,integer,1,NULL,1
1,ENAME,varchar(20),1,NULL,0
2,JOB,varchar(20),1,NULL,0
3,MGR,integer,0,NULL,0
4,HIREDATE,date,1,NULL,0
5,SAL,integer,1,NULL,0
6,COMM,integer,0,NULL,0
7,DEPTNO,integer,1,NULL,0
1 cid name type notnull dflt_value pk
2 0 EMPNO integer 1 NULL 1
3 1 ENAME varchar(20) 1 NULL 0
4 2 JOB varchar(20) 1 NULL 0
5 3 MGR integer 0 NULL 0
6 4 HIREDATE date 1 NULL 0
7 5 SAL integer 1 NULL 0
8 6 COMM integer 0 NULL 0
9 7 DEPTNO integer 1 NULL 0

@ -0,0 +1,5 @@
cid,name,type,notnull,dflt_value,pk
0,PROJID,integer,1,NULL,1
1,EMPNO,integer,1,NULL,0
2,STARTDATE,date,1,NULL,0
3,ENDDATE,date,1,NULL,0
1 cid name type notnull dflt_value pk
2 0 PROJID integer 1 NULL 1
3 1 EMPNO integer 1 NULL 0
4 2 STARTDATE date 1 NULL 0
5 3 ENDDATE date 1 NULL 0

@ -0,0 +1,16 @@
ENAME,DNAME,PROJID,Manager
KING,ACCOUNTING,2,NULL
KING,ACCOUNTING,5,NULL
KING,ACCOUNTING,8,NULL
KING,ACCOUNTING,11,NULL
KING,ACCOUNTING,14,NULL
MILLER,ACCOUNTING,3,CLARK
MILLER,ACCOUNTING,6,CLARK
MILLER,ACCOUNTING,9,CLARK
MILLER,ACCOUNTING,12,CLARK
MILLER,ACCOUNTING,15,CLARK
CLARK,ACCOUNTING,1,KING
CLARK,ACCOUNTING,4,KING
CLARK,ACCOUNTING,7,KING
CLARK,ACCOUNTING,10,KING
CLARK,ACCOUNTING,13,KING
1 ENAME DNAME PROJID Manager
2 KING ACCOUNTING 2 NULL
3 KING ACCOUNTING 5 NULL
4 KING ACCOUNTING 8 NULL
5 KING ACCOUNTING 11 NULL
6 KING ACCOUNTING 14 NULL
7 MILLER ACCOUNTING 3 CLARK
8 MILLER ACCOUNTING 6 CLARK
9 MILLER ACCOUNTING 9 CLARK
10 MILLER ACCOUNTING 12 CLARK
11 MILLER ACCOUNTING 15 CLARK
12 CLARK ACCOUNTING 1 KING
13 CLARK ACCOUNTING 4 KING
14 CLARK ACCOUNTING 7 KING
15 CLARK ACCOUNTING 10 KING
16 CLARK ACCOUNTING 13 KING

@ -0,0 +1,8 @@
SELECT emp.ENAME, dept.DNAME, proj.PROJID, Managers.Manager
FROM dept
INNER JOIN emp
on dept.DEPTNO = emp.DEPTNO
INNER JOIN proj
ON emp.EMPNO = proj.EMPNO
INNER JOIN Managers
ON Managers.Employee = emp.ENAME
Loading…
Cancel
Save