Changes between Version 8 and Version 9 of AdvancedReports


Ignore:
Timestamp:
02/03/26 19:09:40 (3 weeks ago)
Author:
213140
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v8 v9  
    298298**Дефинирање на Blog_Monthly**
    299299
    300 
    301 
     300F{bm} ← π{id_blog, id_patient, YEAR(date_of_post) -> year, MONTH(date_of_post) -> month} (B)
     301
     302BM ← {year, month} σCOUNT(id_blog) -> total_blogs, COUNT(DISTINCT {id_patient}) -> active_bloggers} (F{bm})
     303
     304**Дефинирање на Diary_Monthly**
     305
     306F{dm} ← π{id_diary, id_patient, daily_rating, YEAR(date) -> year, MONTH(date) -> month} (D)
     307
     308DM ← {year, month} σ{COUNT(id_diary) -> total_diaries, COUNT(DISTINCT id\_patient) -> active_diarists, AVG(daily_rating) -> avg_monthly_mood} (F{dm})
     309
     310**Поврзување на Monthly_Stats**
     311
     312MS ← BM ⟗{BM.year = DM.year ∧ BM.month = DM.month} DM
     313
     314MS{final} ← π{COALESCE(BM.year, DM.year) -> year, COALESCE(BM.month, DM.month) -> month, ..., avg_monthly_mood} (MS)
     315
     316**Selection и Projection**
     317
     318P ←
     319π{year, month, total_blogs, total_diaries, avg_monthly_mood, (total_blogs / active_bloggers) -> BlogsPerUser, (total_diaries / active_diarists) -> DiariesPerUser} (MS{final})
     320
     321P{ext} ←
     322π{*, CASE_WHEN}(...) -> BehaviourType, (total_blogs / (total_blogs + total_diaries)) * 100 -> PublicityRate} (P)
     323
     324**Подредување**
     325
     326R{final} ← τ{year DESC, month DESC} (P{ext})
     327