{"id":28213221,"url":"https://github.com/deddyandri/tomanbikeshare","last_synced_at":"2026-01-24T11:38:59.048Z","repository":{"id":277288230,"uuid":"931937365","full_name":"deddyandri/TomanBikeShare","owner":"deddyandri","description":"SQL \u0026 Power BI project about helping Toman Bike Share to understand if increasing prices next year is possible","archived":false,"fork":false,"pushed_at":"2025-03-30T01:51:09.000Z","size":748,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T17:57:37.212Z","etag":null,"topics":["powerbi","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/deddyandri.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}},"created_at":"2025-02-13T05:10:26.000Z","updated_at":"2025-03-30T01:51:13.000Z","dependencies_parsed_at":"2025-02-13T06:29:13.521Z","dependency_job_id":"3c77fc7d-eecc-4521-a7fe-d261cf015777","html_url":"https://github.com/deddyandri/TomanBikeShare","commit_stats":null,"previous_names":["deddyandri/tomanbikeshare"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deddyandri/TomanBikeShare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deddyandri%2FTomanBikeShare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deddyandri%2FTomanBikeShare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deddyandri%2FTomanBikeShare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deddyandri%2FTomanBikeShare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deddyandri","download_url":"https://codeload.github.com/deddyandri/TomanBikeShare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deddyandri%2FTomanBikeShare/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28727080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: 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":["powerbi","sql"],"created_at":"2025-05-17T20:10:15.929Z","updated_at":"2026-01-24T11:38:59.011Z","avatar_url":"https://github.com/deddyandri.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"from now on, I will show my work process in the readme, so that everyone can understand better.\nunless it's a long process, then I'll make it in pdf\n\n## the final result of power bi visualization is\n![image](https://github.com/user-attachments/assets/dbf56738-7907-4a70-8683-16dfe0b4f833)\n\nrecomendation based on calculation of sum of riders, sum of revenue, sum of profit , and average of price\n\n![image](https://github.com/user-attachments/assets/99b64a5e-bc74-4c13-9d4a-8cb3d4da942d)\n\n![image](https://github.com/user-attachments/assets/8ce5a020-d8a0-469c-b024-b267fd0b8cbe)\n\n# TomanBikeShare\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/19f85cfa-d7aa-4800-a196-483dd8cd375d\" width=\"600\" height=\"500\" /\u003e\n\u003c/p\u003e\n\n# Requirements :\n1.  Hourly revenue analysis\n2.  Profit and Revenue Trends\n3.  Seasonal Revenue\n4.  Rider Demographics\n\n# process steps\n\n\nfirst open SQL server management studio \n\nwe start with create database by right click on folder Databases then click New database\n\n![image](https://github.com/user-attachments/assets/de2ddc5f-40f8-48b9-8e6c-ecdf04a2088e)\n\non Database name, filled with name bike_data\n\n![image](https://github.com/user-attachments/assets/f3318856-a71a-4801-965d-2f0f3cd47d4c)\n\nnow you could see bike_data Databases\n\n![image](https://github.com/user-attachments/assets/5923326d-70e7-4325-aeae-80c563b35d7b)\n\nwe can now add tabel to the databases , \n\nright click on bike_data, then Task, and Import flat file\n\n\n![image](https://github.com/user-attachments/assets/25cf6061-1c5e-48d5-a273-6d614143d2dd)\n\nwindows will appear, then click just next\n\u003cp align=\"left\"\u003e\n  \u003cimage src=\"https://github.com/user-attachments/assets/4b958c56-0316-4ee7-8a68-b49c0f2d4784\" width = 50% height=50% /\u003e\n  \u003c/p\u003e\nthen click browse to find the file\nthe file name is in the attachment on this github, you can download it\n\nfirst we enter a file called bike_share_yr_0.csv\n\u003cp align=\"left\"\u003e\n\u003cimage src=\"https://github.com/user-attachments/assets/81df8b3f-7674-40d4-ac02-7f418995a177\" width = 50% heigh=50% /\u003e\n\u003c/p\u003e\n\nthen click next\n\na preview of the data will appear, \n\n\u003cimage src=\"https://github.com/user-attachments/assets/0446c9cb-439c-438f-9e21-ca2b183f652e\" width=50% heigh=50% /\u003e\n\nto note here, click uncheck at the bottom of the preview table\n\n![image](https://github.com/user-attachments/assets/d6287495-4850-4a9c-879d-f690e34c9237)\n\nmodify column will appear, we can change the data type and column name, then click next, \nafter the summary is shown, click finish\n\u003cimage src=\n\"https://github.com/user-attachments/assets/6e8c8e4b-b0cc-4a9a-8bd2-14feaf8ee9fc\" width=50% heigh=50% /\u003e\n\nthe next step is to click refresh located at the top \n\n![image](https://github.com/user-attachments/assets/87c0e8f8-40f4-4690-8bce-eefb5deec15c)\n\na table called dbo.bike_share_yr_0 has been inserted into the bike_data database. \n\n![image](https://github.com/user-attachments/assets/bcd0c40b-db63-4596-a64c-a57c095392d9)\n\nTo view the table contents, right-click on the table you want to view. then click select top 1000 rows\n\n![image](https://github.com/user-attachments/assets/b4a6a056-b47c-4936-b8b6-6d16beb59905)\n\nthe result is the content of the table (1000 rows) and the SQL query\n\n![image](https://github.com/user-attachments/assets/6d95ae0a-089d-4bef-9daf-fd5c4327f0c5)\n\n#### we can add 2 other files namely dbo.bike_share_yr_1 and dbo.cost_table \n#### in the way that I have described above\n#### after refreshing, the 3 files have been entered into the bike_data databases.\n\n![image](https://github.com/user-attachments/assets/8672ed39-1e45-44bd-bd44-0b7c372c9ebc)\n\nwe will now increase the font size of the script display and result display\n\nThe method is, on the main menu, select tools, then options\n\n#### an Options window will appear\n\n![image](https://github.com/user-attachments/assets/8d47360d-e15e-4c89-91f1-3b9f142cac7e)\n\n#### choose Environment then Fonts and Colors\n\n![image](https://github.com/user-attachments/assets/8b463048-4cb6-41e3-bd27-44d2c004fe8c)\n\n#### on the \"show settings for\", choose Grid Results, we can change Font and size, \n#### I prefer using Arial font with size 12, then OK\n![image](https://github.com/user-attachments/assets/3b2b99e9-fb05-4ddc-b610-8d89bee1d91b)\n\nto be able to see the changes, the application must be restarted first\n\nwe go back to table dbo.bike_share_yr_0 \nnow we block all the sql coding, to be deleted \npress Delete key on the keyboard\n\n![image](https://github.com/user-attachments/assets/a4a454e3-a72a-47f6-aab8-0e4966b3729c)\n\nwe will merge the two files bike_share_yr_0 and bike_share_yr_1, using the union function\n```sql\nselect * from bike_share_yr_0\nunion\nselect * from bike_share_yr_1\n```\nWe can see the result at the bottom right of the result query, where the number of rows is 34,758.\n\n![image](https://github.com/user-attachments/assets/0d1b934e-b771-4118-ab29-91b505499657)\n\nwe will see the contents of the cost_table query \n\n![image](https://github.com/user-attachments/assets/528d734d-0dc8-41ce-9fd2-51a129b8f13d)\n\nwe will join the table previously formed with the cost_table query, \nhere we see the cost table can join the main table through the yr column\nwe will join using the left join function and CTE (Common Table Expression) \nWe can see the combined table between bike_share_yr_0 and yr_1 as follows :\n\n![image](https://github.com/user-attachments/assets/b343a222-bca5-4555-a65f-4d596caa2d3d)\n\n```sql\nwith cte as(\n\tselect * from bike_share_yr_0\n\tunion\n\tselect * from bike_share_yr_1)\n-- Main Query\nselect * from cte a\nleft join cost_table b\non a.yr = b.yr\n```\n\nThe result is that there are additional new columns, namely price and COGS, to the right of the main column.\n\n![image](https://github.com/user-attachments/assets/6ad63dcc-5b95-40fb-9cc4-b7cd0409101a)\n\nwe will use just some columns,\n```sql\nwith cte as(\n\tselect * from bike_share_yr_0\n\tunion\n\tselect * from bike_share_yr_1)\n\nselect \ndteday,\nseason,\na.yr,\nweekday,\nhr,\nrider_type,\nriders,\nprice,\nCOGS\n\nfrom cte a\nleft join cost_table b\non a.yr = b.yr\n```\nthe results are\n\n![image](https://github.com/user-attachments/assets/9f390308-d916-49a6-b2a6-7c3e45a24cf7)\n\nwe also add revenue column which is the multiplication of the rider column by the price\nand Profit Column which is multiplication of rider x price minus COGS\n\n![image](https://github.com/user-attachments/assets/b87785a6-e006-42a2-868c-44bdb57f4f8a)\n\n```sql\nwith cte as(\n\tselect * from bike_share_yr_0\n\tunion\n\tselect * from bike_share_yr_1)\n\nselect \ndteday,\nseason,\na.yr,\nweekday,\nhr,\nrider_type,\nriders,\nprice,\nCOGS,\nriders*price as Revenue,\nriders*price - COGS as Profit\n\nfrom cte a\nleft join cost_table b\non a.yr = b.yr\n```\nthe final result are\n\n![image](https://github.com/user-attachments/assets/74b9e471-40df-4b63-ab60-365512b3f70a)\n\nwe will use this query to make a visualization in power BI.\nIn order for this query to connect with Power BI, we need to know the server type and server name. \nThe first step is:\nat the top of Object Explorer menu, click server name, then right click, choose connect\n\n![image](https://github.com/user-attachments/assets/0be7e33c-6e56-4a7b-b3c1-c4bfcd877a48)\n\nwe can identify its server name, my server name is HOME-PC1 , block and copy the server name\n\n![image](https://github.com/user-attachments/assets/22406e0e-9e70-45d5-9cb8-5efa13e3930b)\n\nnow open the microsoft power bi desktop application\non menu click get data, then Server Name\nwe then fill in server name and database name\n\n![image](https://github.com/user-attachments/assets/12294fbe-0ab7-4086-b2ac-7d6a7b3836f9)\n\nthen click Advanced Option to fill in SQL Statement\n\nwe then open SQL SMS to copy the final query\n\n![image](https://github.com/user-attachments/assets/992d972f-f785-4154-a400-130be460585f)\n\nthen paste it on SQL Server database windows which is in power bi\n\n![image](https://github.com/user-attachments/assets/a6d47dc9-bf6b-4167-8bcb-beb8bb93a32c)\n\nthen click OK\nthen the windows will appear again, click connect, Then OK\n\n![image](https://github.com/user-attachments/assets/e0e9dc05-c6e5-44f3-b21a-74cffc74ce2d)\n\nnow we start move on to microsoft power BI desktop\nafter the process of importing sql query to power BI, \nin the power BI desktop application there will be a window that contains the sql query that we have created.\n\n![image](https://github.com/user-attachments/assets/79a6ce3a-ac95-456e-b077-dcf4cc3b2963)\n\nclick Load\n\nWe can check whether the query has been entered, by clicking on the table view in the left menu of the Power BI desktop.\n\n![image](https://github.com/user-attachments/assets/1868160d-f374-4276-8a40-4277be905c36)\n\nwe now start making the visualization\n\nI will not explain the visualization process in power BI, but you can see the file in the attached file.\n\nthere is a slight change to the revenue formula, for that we can change it through the Power BI desktop.\n\nthere is a Transform data on top of power BI menu\n\n![image](https://github.com/user-attachments/assets/7b3869f0-14b0-46c4-ab1c-ed822850b307)\n\ndata transform windows will appear\n\n![image](https://github.com/user-attachments/assets/37ee7587-83d4-4b40-a5d3-eba72463403d)\n\non the right side, there is APPLIED STEP menu, click on gear icon beside the text is written Source\n\n![image](https://github.com/user-attachments/assets/07288465-f6a0-41d7-8885-a2b3cd7a7295)\n\nThere will be a SQL server database window, in the section labeled “SQL statement”, we will change the sql code\n\n![image](https://github.com/user-attachments/assets/9b57ca1b-25f1-4eab-86cc-9db63b6eb4bf)\n\nwe will change this code\n\n![image](https://github.com/user-attachments/assets/668bbb5e-c1a5-4e74-960e-b9e4e250af5d)\n\nbecome\n\n![image](https://github.com/user-attachments/assets/40f32390-553b-4c3e-adf3-983f974d8be5)\n\nthen click OK\non the top left corner, click Close\u0026Apply\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeddyandri%2Ftomanbikeshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeddyandri%2Ftomanbikeshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeddyandri%2Ftomanbikeshare/lists"}