{"id":44971821,"url":"https://github.com/konstantinkalinichenko/payments-analysis","last_synced_at":"2026-02-18T16:02:58.606Z","repository":{"id":335657089,"uuid":"1146596574","full_name":"KonstantinKalinichenko/Payments-Analysis","owner":"KonstantinKalinichenko","description":"A project to analyze payments on a fictitious streaming platform using SQL","archived":false,"fork":false,"pushed_at":"2026-01-31T14:02:58.000Z","size":10152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T23:36:38.617Z","etag":null,"topics":["db","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/KonstantinKalinichenko.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-31T11:04:38.000Z","updated_at":"2026-01-31T20:58:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/KonstantinKalinichenko/Payments-Analysis","commit_stats":null,"previous_names":["konstantinkalinichenko/payments-analysis"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/KonstantinKalinichenko/Payments-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonstantinKalinichenko%2FPayments-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonstantinKalinichenko%2FPayments-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonstantinKalinichenko%2FPayments-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonstantinKalinichenko%2FPayments-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KonstantinKalinichenko","download_url":"https://codeload.github.com/KonstantinKalinichenko/Payments-Analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonstantinKalinichenko%2FPayments-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29585441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["db","postgresql","sql"],"created_at":"2026-02-18T16:02:55.733Z","updated_at":"2026-02-18T16:02:58.601Z","avatar_url":"https://github.com/KonstantinKalinichenko.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payments-Analysis\n\n**Project Overview**\n\nThis project focuses on payment analysis for a fictional streaming platform (Streamora) using SQL.\nIt models the flow of virtual currency purchases, gift transactions between viewers and streamers, internal balances, and creator payouts, and uses SQL to extract insights and key metrics from the data.\n\n**Streamora** is an online live-streaming platform.\nIn Streamora broadcasters (a.k.a. Streamers, creators, BCs) make live-streaming and the viewers (a.k.a. Gifters, gift senders) send them gifts.\nViewers purchased in-app currency (coins 🪙) for real money.\nEach gift has a price in coins.\n\n**Gift mechanics:**\n\nOnce the gift is sent: Streamora deducts coins🪙 (in amount of gift price) from the gifter, the nice animation of the gift is\nshown on live-stream, and the broadcaster receives diamonds 💎 - a second type of in-app currency.\nThe conversion rate from coins to diamonds is x0.7\n\n**Example:** viewer John sends gift Rose🌹(gift price is 1,000 coins🪙) to Andrew. Streamora deducts 1,000 coins🪙\nfrom John, shows nice animation of Rose🌹on Andrew’s live-stream and deposit 1,000*0.7=700 diamonds💎 to\nAndrew’s balance.\n\n**Cash-out mechanics:**\n\nThe broadcaster can request the cash-out (a.k.a. withdrawal, redeem) of diamonds💎 to his bank account. The\nconversion rate from diamonds💎 to USD💲 is x0.005 (divided by 200)\n\n**Example:** Andrew has 25,000 diamonds💎 on his balance. He requested the cash-out of 20,000 diamonds💎(it is\npossible to request the cash-out not for all diamonds💎). The total amount of USD💲would be 20,000/200=$100.\n\n**Data Schema and Ǫuality**\n\n**fact_redeems**: Contains the information about successful redeem requests of creators such as redeem id,\nredeem request timestamp, creator id, creator registration date, amount in diamonds, amount in usd usd,\ncountry of creator.\n\nExample rows:\n\n| redeem_id | timestamp               | creator_id | registration_date | amount_in_diamonds | amount_in_dollar | country_code |\n| --------- | ----------------------- | ---------- | ----------------- | ------------------ | ---------------- | ------------ |\n| 8862668   | 2023-06-30 05:25:09 UTC | 3196313945 | 2023-06-19        | 17800              | 89               | VN           |\n| 8871850   | 2023-06-30 23:50:42 UTC | 2872999101 | 2022-05-22        | 36400              | 182              | RU           |\n\n**fact_gifts**: Contain the information about all gifts which were sent in Streamora, such as sender id (gifter),\nrecipient id (creator), timestamp of gift, coins spent (by gifter), diamonds earned (by creator).\n\nExample rows:\n\n| sender_account_id | receipt_account_id | timestamp               | coins_spent | diamonds_earned |\n| ----------------- | ------------------ | ----------------------- | ----------- | --------------- |\n| 2535498772        | 2738098788         | 2023-05-06 08:57:19 UTC | 1200        | 840             |\n| 3083868987        | 3107575159         | 2023-05-06 08:57:05 UTC | 358         | 250             |\n\n**fact_purchases**: Contains the information about all successful purchasers of gifters such as purchase id,\naccount id (gifter), country of purchaser (gifter), timestamp of purchase, usd amount, coins amount.\n\nExample rows:\n\n| purchase_id | account_id | timestamp               | price_usd | coins_purchased |\n| ----------- | ---------- | ----------------------- | --------- | --------------- |\n| 45807332    | 2572397152 | 2023-01-10 19:07:19 UTC | 0.99      | 100             |\n| 45807250    | 3067879511 | 2023-01-10 19:05:24 UTC | 0.99      | 200             |\n\n**dim_user_country**: Contains the information about the user (both creators and gifters) and their country:\naccount_id and country.\n\nExample rows:\n\n| account_id | country      |\n| ---------- | ------------ |\n| 2572397152 | Saudi Arabia |\n| 3067879511 | Malaysia     |\n\n\n**Project Structure:**\n\nBelow is an overview of the main directories and files in this repository:\n\nPayments-Analysis/  \n├── data/  \n├── results/  \n├── sql/  \n├── schema.png  \n├── tasks.md  \n└── README.md  \n\n**data**:\n\nThis directory contains the raw input data used for the payment analysis of a fictional streaming platform called Streamora.\n\n**results:**\n\nThe results/ folder stores the outputs of the analysis, such as aggregated tables, query results, reports, or exported data produced as part of the SQL analysis.\n\n**sql:**\n\nThis directory contains SQL scripts used to analyze the data.\nThe scripts typically include queries for data extraction, joins, aggregations, and calculations of business metrics related to payments, revenue, and user behavior.\n\n**schema.png:**\n\nschema.png is a database schema diagram that visualizes the data model.\nIt shows tables, relationships, and key fields, helping to understand how the data is structured and connected.\n\n**tasks.md:**\n\nThe tasks.md file describes the project tasks and analytical goals.\nIt outlines the business questions to be answered and the objectives of the analysis, providing context for the SQL queries and results.\n\n\u003cimg width=\"742\" height=\"395\" alt=\"schema\" src=\"https://github.com/user-attachments/assets/a6945cea-9273-4873-9af9-ece00847e66c\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonstantinkalinichenko%2Fpayments-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonstantinkalinichenko%2Fpayments-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonstantinkalinichenko%2Fpayments-analysis/lists"}