forked from odrobnik/MyAppSales
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
330 lines (320 loc) · 26.5 KB
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
CREATE TABLE app ('id' INTEGER PRIMARY KEY, 'title' VARCHAR, 'vendor_identifier' VARCHAR, company_name VARCHAR);
CREATE UNIQUE INDEX app_name ON app (vendor_identifier);
CREATE TABLE sale (report_id INTEGER, app_id INTEGER, type_id INTEGER, units INTEGER, royalty_price REAL, royalty_currency CHAR(3), customer_price REAL, customer_currency CHAR(3), country_code CHAR(2));
create table report (id INTEGER PRIMARY KEY, report_type_id INTEGER, from_date DATE, until_date DATE, downloaded_date DATE);
create table country (
CountryID int not null,
Iso2 char(2) not null,
Iso3 char(3) not null,
Name varchar(100) not null,
app_store_id int,
constraint PK_COUNTRY primary key (CountryID)
);
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (4, 'AF', 'AFG', 'Afghanistan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (248, 'AX', 'ALA', 'Aland Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (8, 'AL', 'ALB', 'Albania');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (12, 'DZ', 'DZA', 'Algeria');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (16, 'AS', 'ASM', 'American Samoa');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (20, 'AD', 'AND', 'Andorra');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (24, 'AO', 'AGO', 'Angola');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (660, 'AI', 'AIA', 'Anguilla');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (10, 'AQ', 'ATA', 'Antarctica');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (28, 'AG', 'ATG', 'Antigua and Barbuda');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (32, 'AR', 'ARG', 'Argentina');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (51, 'AM', 'ARM', 'Armenia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (533, 'AW', 'ABW', 'Aruba');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (36, 'AU', 'AUS', 'Australia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (40, 'AT', 'AUT', 'Austria');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (31, 'AZ', 'AZE', 'Azerbaijan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (44, 'BS', 'BHS', 'Bahamas');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (48, 'BH', 'BHR', 'Bahrain');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (50, 'BD', 'BGD', 'Bangladesh');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (52, 'BB', 'BRB', 'Barbados');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (112, 'BY', 'BLR', 'Belarus');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (56, 'BE', 'BEL', 'Belgium');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (84, 'BZ', 'BLZ', 'Belize');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (204, 'BJ', 'BEN', 'Benin');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (60, 'BM', 'BMU', 'Bermuda');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (64, 'BT', 'BTN', 'Bhutan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (68, 'BO', 'BOL', 'Bolivia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (70, 'BA', 'BIH', 'Bosnia and Herzegovina');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (72, 'BW', 'BWA', 'Botswana');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (74, 'BV', 'BVT', 'Bouvet Island');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (76, 'BR', 'BRA', 'Brazil');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (86, 'IO', 'IOT', 'British Indian Ocean Territory');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (96, 'BN', 'BRN', 'Brunei Darussalam');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (100, 'BG', 'BGR', 'Bulgaria');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (854, 'BF', 'BFA', 'Burkina Faso');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (108, 'BI', 'BDI', 'Burundi');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (116, 'KH', 'KHM', 'Cambodia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (120, 'CM', 'CMR', 'Cameroon');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (124, 'CA', 'CAN', 'Canada');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (132, 'CV', 'CPV', 'Cape Verde');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (136, 'KY', 'CYM', 'Cayman Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (140, 'CF', 'CAF', 'Central African Republic');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (148, 'TD', 'TCD', 'Chad');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (152, 'CL', 'CHL', 'Chile');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (156, 'CN', 'CHN', 'China');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (162, 'CX', 'CXR', 'Christmas Island');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (166, 'CC', 'CCK', 'Cocos (Keeling) Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (170, 'CO', 'COL', 'Colombia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (174, 'KM', 'COM', 'Comoros');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (178, 'CG', 'COG', 'Congo');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (180, 'CD', 'COD', 'Congo, Democratic Republic of the');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (184, 'CK', 'COK', 'Cook Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (188, 'CR', 'CRI', 'Costa Rica');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (384, 'CI', 'CIV', 'Côte d''Ivoire');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (191, 'HR', 'HRV', 'Croatia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (192, 'CU', 'CUB', 'Cuba');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (196, 'CY', 'CYP', 'Cyprus');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (203, 'CZ', 'CZE', 'Czech Republic');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (208, 'DK', 'DNK', 'Denmark');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (262, 'DJ', 'DJI', 'Djibouti');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (212, 'DM', 'DMA', 'Dominica');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (214, 'DO', 'DOM', 'Dominican Republic');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (218, 'EC', 'ECU', 'Ecuador');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (818, 'EG', 'EGY', 'Egypt');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (222, 'SV', 'SLV', 'El Salvador');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (226, 'GQ', 'GNQ', 'Equatorial Guinea');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (232, 'ER', 'ERI', 'Eritrea');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (233, 'EE', 'EST', 'Estonia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (231, 'ET', 'ETH', 'Ethiopia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (238, 'FK', 'FLK', 'Falkland Islands (Malvinas)');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (234, 'FO', 'FRO', 'Faroe Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (242, 'FJ', 'FJI', 'Fiji');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (246, 'FI', 'FIN', 'Finland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (250, 'FR', 'FRA', 'France');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (254, 'GF', 'GUF', 'French Guiana');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (258, 'PF', 'PYF', 'French Polynesia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (260, 'TF', 'ATF', 'French Southern Territories');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (266, 'GA', 'GAB', 'Gabon');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (270, 'GM', 'GMB', 'Gambia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (268, 'GE', 'GEO', 'Georgia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (276, 'DE', 'DEU', 'Germany');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (288, 'GH', 'GHA', 'Ghana');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (292, 'GI', 'GIB', 'Gibraltar');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (300, 'GR', 'GRC', 'Greece');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (304, 'GL', 'GRL', 'Greenland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (308, 'GD', 'GRD', 'Grenada');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (312, 'GP', 'GLP', 'Guadeloupe');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (316, 'GU', 'GUM', 'Guam');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (320, 'GT', 'GTM', 'Guatemala');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (831, 'GG', 'GGY', 'Guernsey');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (324, 'GN', 'GIN', 'Guinea');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (624, 'GW', 'GNB', 'Guinea-Bissau');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (328, 'GY', 'GUY', 'Guyana');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (332, 'HT', 'HTI', 'Haiti');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (334, 'HM', 'HMD', 'Heard Island and McDonald Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (336, 'VA', 'VAT', 'Holy See (Vatican City State)');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (340, 'HN', 'HND', 'Honduras');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (344, 'HK', 'HKG', 'Hong Kong');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (348, 'HU', 'HUN', 'Hungary');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (352, 'IS', 'ISL', 'Iceland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (356, 'IN', 'IND', 'India');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (360, 'ID', 'IDN', 'Indonesia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (364, 'IR', 'IRN', 'Iran, Islamic Republic of');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (368, 'IQ', 'IRQ', 'Iraq');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (372, 'IE', 'IRL', 'Ireland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (833, 'IM', 'IMN', 'Isle of Man');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (376, 'IL', 'ISR', 'Israel');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (380, 'IT', 'ITA', 'Italy');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (388, 'JM', 'JAM', 'Jamaica');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (392, 'JP', 'JPN', 'Japan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (832, 'JE', 'JEY', 'Jersey');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (400, 'JO', 'JOR', 'Jordan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (398, 'KZ', 'KAZ', 'Kazakhstan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (404, 'KE', 'KEN', 'Kenya');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (296, 'KI', 'KIR', 'Kiribati');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (408, 'KP', 'PRK', 'Korea, Democratic People''s Republic of');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (410, 'KR', 'KOR', 'Korea, Republic of');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (414, 'KW', 'KWT', 'Kuwait');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (417, 'KG', 'KGZ', 'Kyrgyzstan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (418, 'LA', 'LAO', 'Lao People''s Democratic Republic');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (428, 'LV', 'LVA', 'Latvia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (422, 'LB', 'LBN', 'Lebanon');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (426, 'LS', 'LSO', 'Lesotho');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (430, 'LR', 'LBR', 'Liberia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (434, 'LY', 'LBY', 'Libyan Arab Jamahiriya');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (438, 'LI', 'LIE', 'Liechtenstein');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (440, 'LT', 'LTU', 'Lithuania');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (442, 'LU', 'LUX', 'Luxembourg');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (446, 'MO', 'MAC', 'Macao');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (807, 'MK', 'MKD', 'Macedonia, the former Yugoslav Republic of');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (450, 'MG', 'MDG', 'Madagascar');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (454, 'MW', 'MWI', 'Malawi');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (458, 'MY', 'MYS', 'Malaysia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (462, 'MV', 'MDV', 'Maldives');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (466, 'ML', 'MLI', 'Mali');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (470, 'MT', 'MLT', 'Malta');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (584, 'MH', 'MHL', 'Marshall Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (474, 'MQ', 'MTQ', 'Martinique');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (478, 'MR', 'MRT', 'Mauritania');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (480, 'MU', 'MUS', 'Mauritius');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (175, 'YT', 'MYT', 'Mayotte');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (484, 'MX', 'MEX', 'Mexico');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (583, 'FM', 'FSM', 'Micronesia, Federated States of');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (498, 'MD', 'MDA', 'Moldova');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (492, 'MC', 'MCO', 'Monaco');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (496, 'MN', 'MNG', 'Mongolia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (499, 'ME', 'MNE', 'Montenegro');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (500, 'MS', 'MSR', 'Montserrat');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (504, 'MA', 'MAR', 'Morocco');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (508, 'MZ', 'MOZ', 'Mozambique');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (104, 'MM', 'MMR', 'Myanmar');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (516, 'NA', 'NAM', 'Namibia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (520, 'NR', 'NRU', 'Nauru');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (524, 'NP', 'NPL', 'Nepal');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (528, 'NL', 'NLD', 'Netherlands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (530, 'AN', 'ANT', 'Netherlands Antilles');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (540, 'NC', 'NCL', 'New Caledonia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (554, 'NZ', 'NZL', 'New Zealand');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (558, 'NI', 'NIC', 'Nicaragua');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (562, 'NE', 'NER', 'Niger');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (566, 'NG', 'NGA', 'Nigeria');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (570, 'NU', 'NIU', 'Niue');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (574, 'NF', 'NFK', 'Norfolk Island');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (580, 'MP', 'MNP', 'Northern Mariana Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (578, 'NO', 'NOR', 'Norway');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (512, 'OM', 'OMN', 'Oman');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (586, 'PK', 'PAK', 'Pakistan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (585, 'PW', 'PLW', 'Palau');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (275, 'PS', 'PSE', 'Palestinian Territory, Occupied');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (591, 'PA', 'PAN', 'Panama');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (598, 'PG', 'PNG', 'Papua New Guinea');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (600, 'PY', 'PRY', 'Paraguay');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (604, 'PE', 'PER', 'Peru');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (608, 'PH', 'PHL', 'Philippines');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (612, 'PN', 'PCN', 'Pitcairn');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (616, 'PL', 'POL', 'Poland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (620, 'PT', 'PRT', 'Portugal');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (630, 'PR', 'PRI', 'Puerto Rico');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (634, 'QA', 'QAT', 'Qatar');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (638, 'RE', 'REU', 'Réunion');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (642, 'RO', 'ROM', 'Romania');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (643, 'RU', 'RUS', 'Russian Federation');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (646, 'RW', 'RWA', 'Rwanda');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (652, 'BL', 'BLM', 'Saint Barthélemy');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (654, 'SH', 'SHN', 'Saint Helena');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (659, 'KN', 'KNA', 'Saint Kitts and Nevis');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (662, 'LC', 'LCA', 'Saint Lucia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (663, 'MF', 'MAF', 'Saint Martin (French part)');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (666, 'PM', 'SPM', 'Saint Pierre and Miquelon');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (670, 'VC', 'VCT', 'Saint Vincent and the Grenadines');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (882, 'WS', 'WSM', 'Samoa');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (674, 'SM', 'SMR', 'San Marino');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (678, 'ST', 'STP', 'Sao Tome and Principe');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (682, 'SA', 'SAU', 'Saudi Arabia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (686, 'SN', 'SEN', 'Senegal');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (688, 'RS', 'SRB', 'Serbia[5]');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (690, 'SC', 'SYC', 'Seychelles');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (694, 'SL', 'SLE', 'Sierra Leone');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (702, 'SG', 'SGP', 'Singapore');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (703, 'SK', 'SVK', 'Slovakia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (705, 'SI', 'SVN', 'Slovenia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (90, 'SB', 'SLB', 'Solomon Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (706, 'SO', 'SOM', 'Somalia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (710, 'ZA', 'ZAF', 'South Africa');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (239, 'GS', 'SGS', 'South Georgia and the South Sandwich Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (724, 'ES', 'ESP', 'Spain');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (144, 'LK', 'LKA', 'Sri Lanka');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (736, 'SD', 'SDN', 'Sudan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (740, 'SR', 'SUR', 'Suriname');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (744, 'SJ', 'SJM', 'Svalbard and Jan Mayen');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (748, 'SZ', 'SWZ', 'Swaziland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (752, 'SE', 'SWE', 'Sweden');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (756, 'CH', 'CHE', 'Switzerland');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (760, 'SY', 'SYR', 'Syrian Arab Republic');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (158, 'TW', 'TWN', 'Taiwan, Province of China');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (762, 'TJ', 'TJK', 'Tajikistan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (834, 'TZ', 'TZA', 'Tanzania, United Republic of');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (764, 'TH', 'THA', 'Thailand');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (626, 'TL', 'TLS', 'Timor-Leste');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (768, 'TG', 'TGO', 'Togo');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (772, 'TK', 'TKL', 'Tokelau');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (776, 'TO', 'TON', 'Tonga');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (780, 'TT', 'TTO', 'Trinidad and Tobago');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (788, 'TN', 'TUN', 'Tunisia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (792, 'TR', 'TUR', 'Turkey');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (795, 'TM', 'TKM', 'Turkmenistan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (796, 'TC', 'TCA', 'Turks and Caicos Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (798, 'TV', 'TUV', 'Tuvalu');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (800, 'UG', 'UGA', 'Uganda');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (804, 'UA', 'UKR', 'Ukraine');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (784, 'AE', 'ARE', 'United Arab Emirates');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (826, 'GB', 'GBR', 'United Kingdom');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (840, 'US', 'USA', 'United States');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (581, 'UM', 'UMI', 'United States Minor Outlying Islands');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (858, 'UY', 'URY', 'Uruguay');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (860, 'UZ', 'UZB', 'Uzbekistan');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (548, 'VU', 'VUT', 'Vanuatu');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (862, 'VE', 'VEN', 'Venezuela');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (704, 'VN', 'VNM', 'Viet Nam');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (92, 'VG', 'VGB', 'Virgin Islands, British');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (850, 'VI', 'VIR', 'Virgin Islands, U.S.');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (876, 'WF', 'WLF', 'Wallis and Futuna');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (732, 'EH', 'ESH', 'Western Sahara');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (887, 'YE', 'YEM', 'Yemen');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (894, 'ZM', 'ZMB', 'Zambia');
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (716, 'ZW', 'ZWE', 'Zimbabwe');
update country set app_store_id = 143441 where iso3='USA';
update country set app_store_id = 143505 where iso3='ARG';
update country set app_store_id = 143460 where iso3='AUS';
update country set app_store_id = 143446 where iso3='BEL';
update country set app_store_id = 143503 where iso3='BRA';
update country set app_store_id = 143455 where iso3='CAN';
update country set app_store_id = 143483 where iso3='CHL';
update country set app_store_id = 143465 where iso3='CHN';
update country set app_store_id = 143501 where iso3='COL';
update country set app_store_id = 143495 where iso3='CRI';
update country set app_store_id = 143494 where iso3='HRV';
update country set app_store_id = 143489 where iso3='CZE';
update country set app_store_id = 143458 where iso3='DNK';
update country set app_store_id = 143443 where iso3='DEU';
update country set app_store_id = 143506 where iso3='SLV';
update country set app_store_id = 143454 where iso3='ESP';
update country set app_store_id = 143447 where iso3='FIN';
update country set app_store_id = 143442 where iso3='FRA';
update country set app_store_id = 143448 where iso3='GRC';
update country set app_store_id = 143504 where iso3='GTM';
update country set app_store_id = 143463 where iso3='HKG';
update country set app_store_id = 143482 where iso3='HUN';
update country set app_store_id = 143467 where iso3='IND';
update country set app_store_id = 143476 where iso3='IDN';
update country set app_store_id = 143449 where iso3='IRL';
update country set app_store_id = 143491 where iso3='ISR';
update country set app_store_id = 143450 where iso3='ITA';
update country set app_store_id = 143466 where iso3='KOR';
update country set app_store_id = 143493 where iso3='KWT';
update country set app_store_id = 143497 where iso3='LBN';
update country set app_store_id = 143451 where iso3='LUX';
update country set app_store_id = 143473 where iso3='MYS';
update country set app_store_id = 143468 where iso3='MEX';
update country set app_store_id = 143452 where iso3='NLD';
update country set app_store_id = 143461 where iso3='NZL';
update country set app_store_id = 143457 where iso3='NOR';
update country set app_store_id = 143445 where iso3='AUT';
update country set app_store_id = 143477 where iso3='PAK';
update country set app_store_id = 143485 where iso3='PAN';
update country set app_store_id = 143507 where iso3='PER';
update country set app_store_id = 143474 where iso3='PHL';
update country set app_store_id = 143478 where iso3='POL';
update country set app_store_id = 143453 where iso3='PRT';
update country set app_store_id = 143498 where iso3='QAT';
update country set app_store_id = 143487 where iso3='ROM';
update country set app_store_id = 143469 where iso3='RUS';
update country set app_store_id = 143479 where iso3='SAU';
update country set app_store_id = 143459 where iso3='CHE';
update country set app_store_id = 143464 where iso3='SGP';
update country set app_store_id = 143496 where iso3='SVK';
update country set app_store_id = 143499 where iso3='SVN';
update country set app_store_id = 143472 where iso3='ZAF';
update country set app_store_id = 143486 where iso3='LKA';
update country set app_store_id = 143456 where iso3='SWE';
update country set app_store_id = 143470 where iso3='TWN';
update country set app_store_id = 143475 where iso3='THA';
update country set app_store_id = 143480 where iso3='TUR';
update country set app_store_id = 143481 where iso3='ARE';
update country set app_store_id = 143444 where iso3='GBR';
update country set app_store_id = 143502 where iso3='VEN';
update country set app_store_id = 143471 where iso3='VNM';
update country set app_store_id = 143462 where iso3='JPN';