Changes between Version 4 and Version 5 of WikiStart/AdvancedReports
- Timestamp:
- 01/29/24 13:24:38 (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart/AdvancedReports
v4 v5 195 195 == **[[span(style=color: #BF1B1B, 6. Листање(приказ) на сите евенти и task-ови за зададен предмет:)]]** 196 196 197 == **[[span(style=color: #BF1B1B, 7. Листање(приказ) на сите на сите книги и автори по одреден предмет:)]]** 197 == **[[span(style=color: #BF1B1B, 7. Листање(приказ) на сите на сите книги и автори по одреден предмет (пример:Бази на податоци):)]]** 198 199 {{{ 200 DECLARE correct_student_id INT; 201 SET correct_student_id = 11111; 202 203 WITH SubjectBooks AS ( 204 SELECT 205 rb.book_id, 206 rb.book_title, 207 ba.author_id, 208 a.author_name 209 FROM 210 recommended_book AS rb 211 JOIN 212 book_author AS ba ON rb.book_id = ba.book_id 213 WHERE 214 rb.subject_name = 'Bazi na podatoci' 215 AND rb.student_id = correct_student_id 216 ) 217 218 SELECT 219 sb.book_id, 220 sb.book_title, 221 sb.author_id, 222 sb.author_name 223 FROM 224 SubjectBooks AS sb; 225 226 }}} 227 198 228 199 229 == **[[span(style=color: #BF1B1B, 8. Приказна на сите feedbacks (описи и наслови на feedback) со оценка помала од 3:)]]** 200 230 201 231 202 232 {{{ 233 DECLARE correct_student_id INT; 234 SET correct_student_id = 11111; 235 236 SELECT 237 fb.fb_id, 238 fb.fb_date, 239 fb.fb_title, 240 fb.fb_description, 241 fb.fb_rating 242 FROM 243 feedback AS fb 244 WHERE 245 fb.fb_rating < 3 246 AND EXISTS ( 247 SELECT 1 248 FROM 249 gives_feedback AS gf 250 WHERE 251 gf.fb_id = fb.fb_id 252 AND gf.student_id = correct_student_id 253 ); 254 }}} 255 256 257 258