|
1. Please confirm that the database used is sqlserver?
2. In sqlserver, if you follow the original host's wording, it does not match the original host's result. The top query of sqlserver does not have with ties by default, so top 30 will not return 33 data. I think to get 33 pieces of data, first add with ties when querying
3. Regarding the different results after sorting, it is normal. You should add with ties to both queries for comparison. For queries with top and order by, in your case, sort first, and then extract the first n data. So after you add the sort condition, in the case of with ties, the previous sort position may be duplicate records, but now it is not the same position. Naturally, no additional data is returned. |
|