goqu
goqu copied to clipboard
Sql server using Limit() with Distinct() wrong order
Describe the bug when distinct() and limit(1) is used together, sql generated is
SELECT TOP (1) DISTINCT
To Reproduce Use distinct and limit clause together with dialect sqlserver
.Distinct().Limit(1)
Expected behavior sql generated should be
SELECT DISTINCT TOP (1)
Dialect:
- [x] sqlserver
- [ ] mysql
- [ ] sqlite3
I have raised a PR that I think would solve the problem https://github.com/doug-martin/goqu/pull/242