Changes between Version 31 and Version 32 of AdvancedReports
- Timestamp:
- 07/22/24 14:27:31 (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedReports
v31 v32 54 54 GROUP BY 55 55 pet_id 56 ), 57 58 PetsWithMaxReports AS ( 59 SELECT 60 pet_id, 61 max_reports_count 62 FROM 63 MaxReportsPerPet 64 WHERE 65 max_reports_count = (SELECT MAX(max_reports_count) FROM MaxReportsPerPet) 56 66 ) 57 67 … … 64 74 DoctorPetReportsCount dprc 65 75 JOIN 66 MaxReportsPerPet mrpp ON dprc.pet_id = mrpp.pet_id AND dprc.reports_count = mrpp.max_reports_count 67 JOIN 68 project.users u ON dprc.doctor_id = u.id 69 WHERE 70 dprc.pet_id = (SELECT pet_id FROM MaxReportsPerPet ORDER BY max_reports_count DESC LIMIT 1); 76 PetsWithMaxReports pwmr ON dprc.pet_id = pwmr.pet_id AND dprc.reports_count = pwmr.max_reports_count 77 JOIN 78 project.users u ON dprc.doctor_id = u.id; 79 71 80 }}} 72 81 == За секое прашање кое е поставено во Blog Post For Consultations колку одговори има, од кои корисници се дадени одговорите и каква е улогата на корисниците кои одговориле(admin, manager, employee, standard).