{"id":20245732,"url":"https://github.com/skytecat/currencytable_sql","last_synced_at":"2025-03-03T15:40:52.328Z","repository":{"id":255623498,"uuid":"850056019","full_name":"skytecat/CurrencyTable_SQL","owner":"skytecat","description":"Data Warehousing (DWH) and ETL process","archived":false,"fork":false,"pushed_at":"2024-09-11T06:30:49.000Z","size":720,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T02:09:06.894Z","etag":null,"topics":["postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":null,"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/skytecat.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":"2024-08-30T19:36:14.000Z","updated_at":"2024-09-11T06:30:52.000Z","dependencies_parsed_at":"2024-11-14T09:29:45.773Z","dependency_job_id":"491f1302-2625-495c-8f47-6eaf9b47f52c","html_url":"https://github.com/skytecat/CurrencyTable_SQL","commit_stats":null,"previous_names":["skytecat/currencytable_sql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skytecat%2FCurrencyTable_SQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skytecat%2FCurrencyTable_SQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skytecat%2FCurrencyTable_SQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skytecat%2FCurrencyTable_SQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skytecat","download_url":"https://codeload.github.com/skytecat/CurrencyTable_SQL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241691845,"owners_count":20004109,"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":["postgresql","sql"],"created_at":"2024-11-14T09:23:42.403Z","updated_at":"2025-03-03T15:40:52.300Z","avatar_url":"https://github.com/skytecat.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Currency Table SQL\n\n## _Data Warehouse_\n\nОписание на русском [тут](./README_RUS.md).\n\nResume: Today you will know what DWH is and how to create a first ETL process.\n\n## Contents\n\n1. [Chapter I](#chapter-i) \\\n    1.1. [Preamble](#preamble)\n2. [Chapter II](#chapter-ii) \\\n    2.1. [Instructions](#instructions)\n3. [Chapter III](#chapter-iii) \\\n    3.1. [Exercise 00 - Classical DWH](#exercise-00-classical-dwh)  \n4. [Chapter IV](#chapter-iv) \\\n    4.1. [Exercise 01 - Detailed Query](#exercise-01-detailed-query)  \n\n## Chapter I\n## Preamble\n\n![T01_01](misc/images/DWH.png)\n\nA Data Warehousing (DWH) is a process for collecting and managing data from disparate sources to provide meaningful business insights. A data warehouse is typically used to connect and analyze business data from heterogeneous sources. The data warehouse is the core of the BI system built for data analysis and reporting.\n\n## Chapter II\n## Instructions\n\nPlease download a [script](src/database/model.sql) with Database Model here and apply the script to your database\n\nPlease take a look at the Logical View of our Database Model.\n\n![T01_06](misc/images/tables.png)\n\n## Chapter III\n## Exercise 00 Classical DWH\n\nLet's take a look at the data sources and the first logical data layer (ODS - Operational Data Store) in the DWH.\n\n![T01_06](misc/images/ODS.png)\n\nPlease write an SQL statement that returns the total volume (sum of all money) of transactions from the user balance aggregated by user and balance type. Note that all data should be processed, including data with anomalies. \n\n## Chapter IV\n## Exercise 01 Detailed Query\n\nBefore diving deeper into this task, please apply the following INSERT statements.\n\n`insert into currency values (100, 'EUR', 0.85, '2022-01-01 13:29');`\n`insert into currency values (100, 'EUR', 0.79, '2022-01-08 13:29');`\n\nPlease write an SQL statement that returns all Users, all Balance transactions (in this task please ignore Currencies that do not have a key in the `Currency` table) with currency name and calculated value of the currency in USD for the next day.\n\n![T01_06](misc/images/currency.png)\n\n- You need to find a nearest rate_to_usd of currency in the past (t1).\n- If t1 is empty (means no rates in the past), then find a nearest rate_to_usd of currency in the future (t2).\n- Use t1 OR t2 rate to calculate a currency in USD format.\n\nSort the result by User Name in descending order and then by User Lastname and Currency name in ascending order.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskytecat%2Fcurrencytable_sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskytecat%2Fcurrencytable_sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskytecat%2Fcurrencytable_sql/lists"}