Changes between Version 14 and Version 15 of WikiStart/AdvancedReports
- Timestamp:
- 01/29/24 17:14:49 (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart/AdvancedReports
v14 v15 252 252 253 253 {{{ 254 DECLARE correct_student_id INT; 255 SET correct_student_id = 11111; 256 257 SELECT 258 ce.calendar_event_id, 259 ce.event_name, 260 ce.event_type, 261 ce.event_description, 262 ce.event_start_time, 263 ce.event_end_time 254 255 DECLARE correct_student_id INT; 256 SET correct_student_id = 11111; 257 DECLARE c_term_type VARCHAR(20); 258 SET c_term_type = 'Zimski'; 259 DECLARE c_starting_year INT; 260 SET c_starting_year = 2023; 261 DECLARE c_finishing_year INT; 262 SET c_finishing_year = 2024; 263 264 SELECT 265 ce.event_name, 266 sat.subject_name, 267 ce.event_type, 268 ce.event_description 264 269 FROM 265 calendar_event ce270 subject_at_term AS sat 266 271 JOIN 267 term t ON ce.starting_year = t.starting_year 268 AND ce.finishing_year = t.finishing_year 269 AND ce.term_type = t.term_type 270 WHERE t.student_id = correct_student_id 271 AND t.starting_year = 2023 272 AND t.finishing_year = 2024 273 AND t.term_type = 'Zimski'; 272 subject_event AS se 273 ON sat.student_id = se.student_id 274 AND sat.term_subject_id = se.term_subject_id 275 AND sat.term_type = se.term_type 276 AND sat.starting_year = se.starting_year 277 AND sat.finishing_year = se.finishing_year 278 JOIN 279 calendar_event AS ce 280 ON se.calendar_event_id = ce.calendar_event_id 281 WHERE 282 se.student_id = correct_student_id 283 AND se.starting_year = c_starting_year 284 AND se.finishing_year = c_finishing_year 285 AND se.term_type = c_term_type; 274 286 }}} 275 287 … … 281 293 DECLARE correct_student_id INT; 282 294 SET correct_student_id = 11111; 295 DECLARE c_term_type VARCHAR(20); 296 SET c_term_type = 'Zimski'; 297 DECLARE c_starting_year INT; 298 SET c_starting_year = 2023; 299 DECLARE c_finishing_year INT; 300 SET c_finishing_year = 2024; 301 DECLARE c_term_subject_id INT; 302 SET c_term_subject_id = 87654; 283 303 284 304 SELECT … … 296 316 FROM 297 317 subject_event se 298 JOIN calendar_event ce ON se.calendar_event_id = ce.calendar_event_id 318 JOIN 319 calendar_event ce ON se.calendar_event_id = ce.calendar_event_id 299 320 WHERE 300 se.term_subject_id = 170569 321 se.term_subject_id = c_term_subject_id 322 AND se.term_type = c_term_type 323 AND se.starting_year = c_starting_year 324 AND se.finishing_year = c_finishing_year 325 AND se.student_id = correct_student_id 326 301 327 UNION 328 302 329 SELECT 303 330 NULL AS calendar_event_id, … … 315 342 creates_task ct 316 343 JOIN 317 task t ON ct.task_id = t.task_id344 task AS t ON ct.task_id = t.task_id 318 345 WHERE 319 ct.term_subject_id = 170569; 320 321 322 346 ct.term_subject_id = c_term_subject_id 347 AND ct.term_type = c_term_type 348 AND ct.starting_year = c_starting_year 349 AND ct.finishing_year = c_finishing_year 350 AND ct.student_id = correct_student_id; 323 351 }}} 324 352