-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_relevance_task_id_1800.sql
1 lines (1 loc) · 2.19 KB
/
create_relevance_task_id_1800.sql
1
create view relevance_task_id_1800 as select task_id, accesses.literature_id as literature_id, relevance from accesses, relevances, sessions_task_id where accesses.session_id = relevances.session_id and accesses.session_id = sessions_task_id.session_id and accesses.literature_id = relevances.literature_id and accesses.access_type = 'read_paper' and relevance <> 'none' and elapsed_time <= 1800 and sessions_task_id.task_id not in (1, 2, 3, 4, 5, 7, 10, 11, 12) union select sessions_task_id.task_id, accesses.literature_id, relevance from accesses, relevances, sessions_task_id where accesses.session_id = relevances.session_id and accesses.literature_id = relevances.literature_id and accesses.session_id = sessions_task_id.session_id and accesses.access_type = 'read_paper' and relevance <> 'none' and sessions_task_id.task_id = 5 and accesses.session_id >= 326 and elapsed_time <= 1800 union select sessions_task_id.task_id, accesses.literature_id, relevance from accesses, relevances, sessions_task_id where accesses.session_id = relevances.session_id and accesses.literature_id = relevances.literature_id and accesses.session_id = sessions_task_id.session_id and accesses.access_type = 'read_paper' and relevance <> 'none' and sessions_task_id.task_id = 7 and accesses.session_id >= 140 and elapsed_time <= 1800 union select sessions_task_id.task_id, accesses.literature_id, relevance from accesses, relevances, sessions_task_id where accesses.session_id = relevances.session_id and accesses.literature_id = relevances.literature_id and accesses.session_id = sessions_task_id.session_id and accesses.access_type = 'read_paper' and relevance <> 'none' and sessions_task_id.task_id = 12 and accesses.session_id >= 388 and elapsed_time <= 1800 union select task_id, literature_id, relevance from relevances, sessions_task_id where relevances.session_id = sessions_task_id.session_id and relevance <> 'none' and task_id = 10 and strftime('%s', sessions_task_id.updated_at) - 1419611681 <= 1800 union select task_id, literature_id, relevance from relevances, sessions_task_id where relevances.session_id = sessions_task_id.session_id and relevance <> 'none' and task_id = 11 and strftime('%s', sessions_task_id.updated_at) - 1419604394 <= 1800;