{"id":23307274,"url":"https://github.com/simonapiz/goldmedalmetrics","last_synced_at":"2026-05-07T11:32:28.387Z","repository":{"id":204474697,"uuid":"711854459","full_name":"SimonaPiz/GoldMedalMetrics","owner":"SimonaPiz","description":"In this project I wrote all the SQL statements for an Olympic metrics reporting web application.","archived":false,"fork":false,"pushed_at":"2023-10-30T14:58:56.000Z","size":383,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T06:23:32.272Z","etag":null,"topics":["codecademy-solutions","javascript","nodejs","sql","sqlite"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimonaPiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-30T10:04:07.000Z","updated_at":"2023-10-30T14:03:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"e39ae8d2-f36e-43fb-94cc-2cbfad6e37b3","html_url":"https://github.com/SimonaPiz/GoldMedalMetrics","commit_stats":null,"previous_names":["simonapiz/goldmedalmetrics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonaPiz%2FGoldMedalMetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonaPiz%2FGoldMedalMetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonaPiz%2FGoldMedalMetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonaPiz%2FGoldMedalMetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimonaPiz","download_url":"https://codeload.github.com/SimonaPiz/GoldMedalMetrics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247574095,"owners_count":20960495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codecademy-solutions","javascript","nodejs","sql","sqlite"],"created_at":"2024-12-20T12:29:39.845Z","updated_at":"2026-05-07T11:32:23.353Z","avatar_url":"https://github.com/SimonaPiz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏅 Gold Medal Metrics\n\u003e An Olympic metrics reporting web application\n\n\u003cimg src=\"https://github.com/SimonaPiz/GoldMedalMetrics/blob/main/preview01.png\" width=\"600px\" alt=\"preview\" title=\"preview\"/\u003e\n\n## Table of Contents\n* [General Info](#general-information)\n  * [Features](#features)\n* [Implementation Details](#implementation-details)\n* [Testing](#testing)\n* [Screenshots](#screenshots)\n* [Technologies Used](#technologies-used)\n* [Usage](#usage)\n* [Acknowledgements](#acknowledgements)\n* [Author](#author)\n\n## General Information\n\nIn this project I wrote all the SQL statements for an Olympic metrics reporting web application called Gold Medal Metrics.\n\nYou can view all of this functionality in action in the video below: [▶](https://content.codecademy.com/programs/build-apis/solution-videos/GoldMedalMetrics480.mov)\n\n### Features\n\nGold Medal Metrics allows users to:\n\n - View countries in a list with their population, GDP, and number of Olympic gold medals.\n - Sort the list of countries by any of these attributes, as well as alphabetically by name.\n - View a detailed description of a country, with statistics on their Olympic wins.\n - View a list of every Olympic win a country has with the year, season, winner name, city, and event.\n - Sort the list of Olympic wins by any of these attributes.\n\n## Implementation Details\n\nTo complete this project, I needed to write a series of JavaScript functions that return the SQL queries (as strings) that operate Gold Medal Metrics:\n\n- [x] `createCountryTable`\n\n  Returns the SQL command that will create a table, named `Country`.\n\n- [x] `createGoldMedalTable`\n\n  Returns the SQL command that will create a table, named `GoldMedal`.\n\n- [x] `goldMedalNumber`\n\n  Returns the SQL command that will retrieve the number of gold medals that country has won in all Olympic games.\n\n- [x] `mostSummerWins`\n\n  Returns the SQL command that will retrieve the year where the given country won the most summer medals\n\n- [x] `mostWinterWins`\n\n  Returns the SQL command that will retrieve the year where the given country won the most winter medals\n\n- [x] `bestYear`\n\n  Returns the SQL command that will retrieve the `year` that country won the most Olympic medals, and how many medals were won.\n\n- [x] `bestDiscipline`\n\n  Returns the SQL command that will retrieve the `discipline` in which that country won the most Olympic medals, and how many medals were won.\n\n- [x] `bestSport`\n\n  Returns the SQL command that will retrieve the `sport` in which that country won the most Olympic medals, and how many medals were won.\n\n- [x] `bestEvent`\n\n  Returns the SQL command that will retrieve the `event` in which that country won the most Olympic medals, and how many medals were won.\n\n- [x] `numberMenMedalists`\n\n  Returns the SQL command that will retrieve the number of men who have won Olympic medals for that country.\n\n- [x] `numberWomenMedalists`\n\n  Returns the SQL command that will retrieve the number of women who have won Olympic medals for that country.\n\n- [x] `mostMedaledAthlete`\n\n  Returns the sql command that will retrieve the `name` of the athlete who won olympic medals for that country.\n\n- [x] `orderedMedals`\n\n  Return a SQL query that returns all fields for every Olympic medal won by the given country in the specified order, ascending or descending.\n\n- [x] Bonus: `orderedSports`\n\n  Return a SQL query that retrieves all the sports that country has received a Gold Medal in in the specified order, ascending or descending. Additionally the query returned should return the number of times the given country received a medal in that sport\n\n✅ [#2 issue](https://github.com/SimonaPiz/GoldMedalMetrics/issues/2)\n\n## Testing\n\nA testing suite has been provided, checking for all essential functionality and\nedge cases.\n\nTo run these tests run \n```\nnpm test\n```\n\n  ✅ [#3 issue](https://github.com/SimonaPiz/GoldMedalMetrics/issues/3)\n\n  ✔ All test passed\n\n  ![Test reults](https://user-images.githubusercontent.com/91121660/279079957-ea0285a2-940d-4273-8981-fa28465503f7.png)\n\n## Screenshots\n\n\u003cimg src=\"https://github.com/SimonaPiz/GoldMedalMetrics/blob/main/preview02.png\" width=\"600px\" alt=\"preview\" title=\"preview\"/\u003e\n\n## Usage\n\nTo view the webpage, run \n```\n$ npm run webpack\n``` \nto compile the front-end files, and follow that with `open index.html` from the root directory of this project. \n\nTo start your server, run \n```\n$ npm install\n``` \nand then `node server.js`. Refresh your browser to collect the information from the server. \n\n## Technologies Used\n   - React 15\n   - react-router-dom 4\n   - mocha 10\n   - chai 4\n   - express 4\n   - sqlite3 5\n\n## Acknowledgements\n\nThis project comes from the [Codecademy's Create a Back-End with JavaScript](https://www.codecademy.com/learn/paths/create-a-back-end-app-with-javascript) course.\n\n## Author\n\n- [Simona Pizio](https://github.com/SimonaPiz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonapiz%2Fgoldmedalmetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonapiz%2Fgoldmedalmetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonapiz%2Fgoldmedalmetrics/lists"}