Title: [Bug]: Exact filter on COUNT() column doesn't work · Issue #3608 · sqlitebrowser/sqlitebrowser · GitHub
Open Graph Title: [Bug]: Exact filter on COUNT() column doesn't work · Issue #3608 · sqlitebrowser/sqlitebrowser
X Title: [Bug]: Exact filter on COUNT() column doesn't work · Issue #3608 · sqlitebrowser/sqlitebrowser
Description: What did you do? I created a view CREATE VIEW "ViewProductsPurchased" AS SELECT (COUNT(Purchases.Product)-COUNT(Purchases.Removed)) AS Count, Products.Manufacturer FROM Products LEFT JOIN Purchases ON Products.Key = Purchases.Product GRO...
Open Graph Description: What did you do? I created a view CREATE VIEW "ViewProductsPurchased" AS SELECT (COUNT(Purchases.Product)-COUNT(Purchases.Removed)) AS Count, Products.Manufacturer FROM Products LEFT JOIN Purchases...
X Description: What did you do? I created a view CREATE VIEW "ViewProductsPurchased" AS SELECT (COUNT(Purchases.Product)-COUNT(Purchases.Removed)) AS Count, Products.Manufacturer FROM Products LEFT JOIN...
Opengraph URL: https://github.com/sqlitebrowser/sqlitebrowser/issues/3608
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Exact filter on COUNT() column doesn't work","articleBody":"### What did you do?\n\nI created a view \r\nCREATE VIEW \"ViewProductsPurchased\" AS \r\n SELECT (COUNT(Purchases.Product)-COUNT(Purchases.Removed)) AS Count, Products.Manufacturer\r\n FROM Products LEFT JOIN Purchases ON Products.Key = Purchases.Product\r\n GROUP BY Products.Key\r\nto count how often a product has been purchased.\r\nSelected 'Exact filter' on a value of the Count column\r\n\n\n### What did you expect to see?\n\nI expected that the list shows all rows containing the exact filter value\n\n### What did you see instead?\n\nThe result list is empty\n\n### DB4S Version\n\n3.13.0-rc1\n\n### What OS are you seeing the problem on?\n\nWindows\n\n### OS version\n\nWindows 10\n\n### Relevant log output\n\n```shell\nFilter 2: \r\nSELECT NULL,* FROM \"main\".\"ViewProductsPurchased\" WHERE \"Count\" = '2' ORDER BY \"Manufacturer\" ASC LIMIT 49999 OFFSET 0;\r\n\r\nI also tried\r\nFilter 2:\r\nSELECT NULL,* FROM \"main\".\"ViewProductsPurchased\" WHERE \"Count\" LIKE '%2%' ESCAPE '\\' ORDER BY \"Manufacturer\" ASC LIMIT 49999 OFFSET 0;\r\nFilter >2:\r\nSELECT NULL,* FROM \"main\".\"ViewProductsPurchased\" WHERE \"Count\" > 2 ORDER BY \"Manufacturer\" ASC LIMIT 49999 OFFSET 0;\r\nBoth showed the expected result set.\r\n\r\nMaybe the exact filter should produce\r\nSELECT NULL,* FROM \"main\".\"ViewProductsPurchased\" WHERE \"Count\" = 2 ORDER BY \"Manufacturer\" ASC LIMIT 49999 OFFSET 0;\r\nor\r\nSELECT NULL,* FROM \"main\".\"ViewProductsPurchased\" WHERE \"Count\" LIKE '2' ESCAPE '\\' ORDER BY \"Manufacturer\" ASC LIMIT 49999 OFFSET 0;\n```\n\n\n### Prevention against duplicate issues\n\n- [X] I have searched for similar issues","author":{"url":"https://github.com/midoragh","@type":"Person","name":"midoragh"},"datePublished":"2024-04-14T07:36:00Z","url":"https://github.com/sqlitebrowser/sqlitebrowser/issues/3608"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4fd686a7-630a-2177-10a6-7ae2bd6cfa21 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98E4:361535:6619E2:8D20DF:6AFCBBE3 |
| html-safe-nonce | 7911c8a7dbebecc2e48a29559155c28d4e668ef049a5a0a754448755fd9dd380 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEU0OjM2MTUzNTo2NjE5RTI6OEQyMERGOjZBRkNCQkUzIiwidmlzaXRvcl9pZCI6Ijc0NjA4MDI5Njg4NzUyMTk5MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5a8fe3e799fbc0e586d89cba40eb468f7f099fca4633782ebe2f6041ea2b7175 |
| hovercard-subject-tag | issue:2242022303 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlitebrowser/sqlitebrowser/3608/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b7f8e1405065cf6741cb2147d2e602bdf2495f71d69b0c45dc9fa6b7dd550f4/sqlitebrowser/sqlitebrowser/issues/3608 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b7f8e1405065cf6741cb2147d2e602bdf2495f71d69b0c45dc9fa6b7dd550f4/sqlitebrowser/sqlitebrowser/issues/3608 |
| og:image:alt | What did you do? I created a view CREATE VIEW "ViewProductsPurchased" AS SELECT (COUNT(Purchases.Product)-COUNT(Purchases.Removed)) AS Count, Products.Manufacturer FROM Products LEFT JOIN Purchases... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | midoragh |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3084aead77cbcb4f4904fba53851fa1a0546b0dec3619bd250815e72588dc6d |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlitebrowser/sqlitebrowser git https://github.com/sqlitebrowser/sqlitebrowser.git |
| octolytics-dimension-user_id | 7454271 |
| octolytics-dimension-user_login | sqlitebrowser |
| octolytics-dimension-repository_id | 19416551 |
| octolytics-dimension-repository_nwo | sqlitebrowser/sqlitebrowser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 19416551 |
| octolytics-dimension-repository_network_root_nwo | sqlitebrowser/sqlitebrowser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5410e4bebd3e45b138c853ecef3992279d86d5af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width