You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain SQL statements using count(*) over () return wrong results. Strangely, I couldn't reproduce this behavior in other SQLite environments. I've also tried it with:
create table test as select 1 as x union all select 2;
--Q1
select *, count(*) over () as cnt
from test;
--Q2
select *, count(*) over () as cnt
from (select * from test);
Q1 returns:
x cnt
1 2
2 2
...which is as expected, but Q2 returns:
x cnt
1 1
2 2
...which is wrong. The expected result of Q2 is the same as Q1, of course.
My first thought was that it had to be an SQLite bug, but I couldn't reproduce it anywhere else, as noted above. I'm not sure if the use of an SQL window function is relevant to the problem or not.
Operating system
Windows 10 Pro x64
SQLiteStudio version
3.4.13
The text was updated successfully, but these errors were encountered:
…AR operator for result columns (in these subselects), so they return correct results.; Fixed execution of complex SELECT queries with subselects, that join multiple tables, some with aliases, some without aliases. Results from such queries would not be editable at all. Now they execute properly using the Smart Execution method.
Details
Certain SQL statements using
count(*) over ()
return wrong results. Strangely, I couldn't reproduce this behavior in other SQLite environments. I've also tried it with:Steps to reproduce
Q1 returns:
...which is as expected, but Q2 returns:
...which is wrong. The expected result of Q2 is the same as Q1, of course.
My first thought was that it had to be an SQLite bug, but I couldn't reproduce it anywhere else, as noted above. I'm not sure if the use of an SQL window function is relevant to the problem or not.
Operating system
Windows 10 Pro x64
SQLiteStudio version
3.4.13
The text was updated successfully, but these errors were encountered: