{"html_url": "https://github.com/simonw/datasette/issues/259#issuecomment-409087501", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/259", "id": 409087501, "node_id": "MDEyOklzc3VlQ29tbWVudDQwOTA4NzUwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-31T04:03:29Z", "updated_at": "2018-07-31T04:03:29Z", "author_association": "OWNER", "body": "Parent ticket: #354", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 322787470, "label": "inspect() should detect many-to-many relationships"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/355#issuecomment-409087871", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/355", "id": 409087871, "node_id": "MDEyOklzc3VlQ29tbWVudDQwOTA4Nzg3MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-31T04:06:22Z", "updated_at": "2018-07-31T04:06:22Z", "author_association": "OWNER", "body": "I started playing with this in the `m2m` branch - work so far: https://github.com/simonw/datasette/compare/295d005ca48747faf046ed30c3c61e7563c61ed2...af4ce463e7518f9d7828b846efd5b528a1905eca\r\n\r\nHere's a demo: https://datasette-m2m-work-in-progress.now.sh/russian-ads-e8e09e2/ads?_m2m_ad_targets__target_id=ec3ac&_m2m_ad_targets__target_id=e128e", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 346027040, "label": "Table view should support filtering via many-to-many relationships"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/356#issuecomment-409088967", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/356", "id": 409088967, "node_id": "MDEyOklzc3VlQ29tbWVudDQwOTA4ODk2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-31T04:14:44Z", "updated_at": "2018-07-31T04:14:44Z", "author_association": "OWNER", "body": "Here's the query I'm playing with for facet counts:\r\n\r\nhttps://datasette-m2m-work-in-progress.now.sh/russian-ads-e8e09e2?sql=select+target_id%2C+count%28*%29+as+n+from+ad_targets%0D%0Awhere%0D%0A++target_id+not+in+%28%22ec3ac%22%2C+%22e128e%22%29%0D%0A++and+ad_id+in+%28select+ad_id+from+ad_targets+where+target_id+%3D+%22ec3ac%22%29%0D%0A++and+ad_id+in+%28select+ad_id+from+ad_targets+where+target_id+%3D+%22e128e%22%29%0D%0Agroup+by+target_id+order+by+n+desc%3B\r\n\r\n```\r\nselect target_id, count(*) as n from ad_targets\r\nwhere\r\n target_id not in (\"ec3ac\", \"e128e\")\r\n and ad_id in (select ad_id from ad_targets where target_id = \"ec3ac\")\r\n and ad_id in (select ad_id from ad_targets where target_id = \"e128e\")\r\ngroup by target_id order by n desc;\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 346028655, "label": "Ability to display facet counts for many-to-many relationships"}, "performed_via_github_app": null}