{"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-623010272", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 623010272, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMzAxMDI3Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-02T20:39:14Z", "updated_at": "2020-05-02T20:39:14Z", "author_association": "MEMBER", "body": "Graph of cumulative stars for Datasette over time: https://github-to-sqlite.dogsheep.net/github?sql=select%0D%0A++yyyymmdd%2C%0D%0A++sum%28n%29+over+%28%0D%0A++++order+by%0D%0A++++++yyyymmdd+rows+unbounded+preceding%0D%0A++%29+as+cumulative_count%0D%0Afrom%0D%0A++%28%0D%0A++++select%0D%0A++++++substr%28starred_at%2C+0%2C+11%29+as+yyyymmdd%2C%0D%0A++++++count%28*%29+as+n%0D%0A++++from%0D%0A++++++stars%0D%0A++++where+repo+%3D+107914493%0D%0A++++group+by%0D%0A++++++yyyymmdd%0D%0A++%29#g.mark=line&g.x_column=yyyymmdd&g.x_type=temporal&g.y_column=cumulative_count&g.y_type=quantitative\r\n\r\n\"github__select_yyyymmdd__sum_n__over___order_by_yyyymmdd_rows_unbounded_preceding___as_cumulative_count_from___select_substr_starred_at__0__11__as_yyyymmdd__count____as_n_from_stars_where_repo___107914493_group_by_yyyymmdd__\"\r\n\r\nStars per day (as a label bar chart, so very wide):\r\n\r\nhttps://github-to-sqlite.dogsheep.net/github?sql=%0D%0A++++select%0D%0A++++++substr%28starred_at%2C+0%2C+11%29+as+yyyymmdd%2C%0D%0A++++++count%28*%29+as+n%0D%0A++++from%0D%0A++++++stars%0D%0A++++where+repo+%3D+107914493%0D%0A++++group+by%0D%0A++++++yyyymmdd%0D%0A++#g.mark=bar&g.x_column=yyyymmdd&g.x_type=ordinal&g.y_column=n&g.y_type=quantitative\r\n\r\n\"github__select_substr_starred_at__0__11__as_yyyymmdd__count____as_n_from_stars_where_repo___107914493_group_by_yyyymmdd\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-623007441", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 623007441, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMzAwNzQ0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-02T20:13:37Z", "updated_at": "2020-05-02T20:13:37Z", "author_association": "MEMBER", "body": "Datasette cumulative stars over time: https://github-to-sqlite.dogsheep.net/github?sql=select%0D%0A++yyyymmdd%2C%0D%0A++sum%28n%29+over+%28%0D%0A++++order+by%0D%0A++++++yyyymmdd+rows+unbounded+preceding%0D%0A++%29+as+cumulative_count%0D%0Afrom%0D%0A++%28%0D%0A++++select%0D%0A++++++substr%28starred_at%2C+0%2C+11%29+as+yyyymmdd%2C%0D%0A++++++count%28*%29+as+n%0D%0A++++from%0D%0A++++++stars%0D%0A++++where+repo+%3D+107914493%0D%0A++++group+by%0D%0A++++++yyyymmdd%0D%0A++%29", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-623006154", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 623006154, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMzAwNjE1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-02T20:01:39Z", "updated_at": "2020-05-02T20:01:54Z", "author_association": "MEMBER", "body": "Needs tests and documentation. I shipped it early to check that the live demo works.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-623004836", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 623004836, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMzAwNDgzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-02T19:49:51Z", "updated_at": "2020-05-02T19:49:51Z", "author_association": "MEMBER", "body": "Alternative pattern:\r\n```\r\nsqlite-utils releases.db 'select full_name from repos' --csv --no-headers \\\r\n | tr -d '\\r' \\\r\n | xargs github-to-sqlite stargazers stars.db\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-623000814", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 623000814, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMzAwMDgxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-02T19:15:23Z", "updated_at": "2020-05-02T19:15:23Z", "author_association": "MEMBER", "body": "I'm not going to do the `--sql` bit just yet. I have patterns for working around this for other commands which are working fine:\r\n\r\nhttps://github.com/dogsheep/github-to-sqlite/blob/d00a53061556dc403c166b443d141c4e1adbd64a/.github/workflows/deploy-demo.yml#L53-L70", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-622990947", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 622990947, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjk5MDk0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-02T17:54:16Z", "updated_at": "2020-05-02T17:54:16Z", "author_association": "MEMBER", "body": "I could add that window function query as a view, but only if the detected version of SQLite supports window functions.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-550388354", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 550388354, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MDM4ODM1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-06T16:26:55Z", "updated_at": "2019-11-06T16:26:55Z", "author_association": "MEMBER", "body": "Here's a query I figured out using a window function that shows cumulative stargazers over time:\r\n```sql\r\nselect\r\n yyyymmdd,\r\n sum(n) over (\r\n order by\r\n yyyymmdd rows unbounded preceding\r\n ) as cumulative_count\r\nfrom\r\n (\r\n select\r\n substr(starred_at, 0, 11) as yyyymmdd,\r\n count(*) as n\r\n from\r\n stars\r\n group by\r\n yyyymmdd\r\n )\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/4#issuecomment-531517138", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4", "id": 531517138, "node_id": "MDEyOklzc3VlQ29tbWVudDUzMTUxNzEzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-09-14T21:59:59Z", "updated_at": "2019-09-14T21:59:59Z", "author_association": "MEMBER", "body": "Paginate through https://api.github.com/repos/simonw/datasette/stargazers\r\n\r\nSend `Accept: application/vnd.github.v3.star+json` to get the `starred_at` dates.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 493670730, "label": "Command to fetch stargazers for one or more repos"}, "performed_via_github_app": null}