Use MySQL Workbench to design your data model for recording details of Olympic cities.
Create a table and add rows for the first three Olympics.
Note: Make year an integer, because MySQL permits only years in the range 1901-2155 when the length is 4.
INSERT INTO city (cityname, country, number, season, year, opendate, closedate) VALUES ('Athens', 'Greece', 1, 'Summer', 1896, '18960406', '18960415'); INSERT INTO city (cityname, country, number, season, year, opendate, closedate) VALUES ('Paris', 'France', 2, 'Summer', 1900, '19000514', '19001026'); INSERT INTO city (cityname, country, number, season, year, opendate, closedate) VALUES ('St. Louis', 'United States', 3, 'Summer', 1904, '19040829', '19040903');
SELECT shrfirm, shrprice FROM share WHERE shrprice > 10;
SELECT shrfirm, shrdiv*shrqty AS payment FROM share ORDER BY payment DESC;
SELECT shrfirm FROM share WHERE shrfirm REGEXP 'sheep|Sheep|geese|Geese';
This page is part of the promotional and support material for Data Management (open edition) by Richard T. Watson |