-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery.sqlite
8 lines (8 loc) · 6.24 KB
/
query.sqlite
1
2
3
4
5
6
7
8
select
Tag,
substr(usernames,1, instr(usernames, ',' )-1) as firstuser,
substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',')-1 )as seconduser,
substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') -1 )as thirduser,
substr(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') )), 1, instr(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') )), ',')-1) as forthuser,
substr(ltrim(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ','))), substr(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') )), 1, instr(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') )), ','))), 1, instr(ltrim(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ','))), substr(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') )), 1, instr(ltrim(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ','))), substr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), 1, instr(ltrim(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), substr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), 1, instr(ltrim(usernames, substr(usernames,1, instr(usernames, ',' ))), ',') )), ',') )), ','))), ',')-1) as fifthuser
FROM users_view