Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution finished with errors. Result: near "(": syntax error At line 1: #3586

Open
geofsharp opened this issue Mar 14, 2024 · 1 comment
Open

Comments

@geofsharp
Copy link

geofsharp commented Mar 14, 2024

DB Browser for SQLite 3.12.2 Linux AppImage

Execution finished with errors.
Result: near "(": syntax error
At line 1:

DB Browser for SQLite Version 3.12.1

Execution finished without errors.
Result: 2 rows returned in 11ms
At line 1:

with seqta_sub as (
	select distinct
	House,
	StudentCode as 'Student ID',
	Surname || ', ' || preferred as 'Student',
	YearLevel as 'Year_Level',
	substr(Roll,14,2) as 'Roll Group',
	SubjectCode as 'Class Code',
	Subject,
	Teacher,
	Affective1 as 'Progress Grade',
	'' as 'Att Rate Ave'
from tbl_seqta
	where StudentCode like '106253435A' and (CalcGrade like 'D%' or CalcGrade like 'E%' or CalcGrade like 'N%' or CalcGrade like 'X')
	order by House, Roll, YearLevel, StudentCode, Surname, Preferred	
),
level_sub as (
	select
		*,
		count(*) over (partition by 'Student ID') as den_count
	from
		seqta_sub
)
select 
	*,
	case
		when den_count >= 1 and Year_Level = '12' then 'level 3'
		when den_count >= 1 and den_count <= 2 then 'level 1'
		when den_count >= 3 and den_count <= 4 then 'level 2'
		when den_count >= 5 then 'level 3'
	end as level
from level_sub
@justinclift justinclift transferred this issue from sqlitebrowser/dbhub.io Mar 14, 2024
@justinclift
Copy link
Member

@geofsharp I've just transferred this issue to the "sqlitebrowser" repository, which I think is the correct one. Also added some formatting to the SQL text, so it's easier to read.

That being said, you should probably try the .AppImage for our latest development build:

https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/continuous

That's had a lot of work since our 3.12.2 release, and it's pretty solid. (We're near to a next release too). 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants