Changes between Version 4 and Version 5 of AdvancedReports


Ignore:
Timestamp:
01/11/22 00:35:29 (3 years ago)
Author:
193105
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v4 v5  
    22
    33== Пациент на кој му се извршени највеќе прегледи
     4{{{#!sql
     5create view pacient_najmnogu_pregledi as
     6select pacient_id ,covek.ime,covek.prezime, count (pregled.pregled_id) pacientot_bil_na_pregled
     7from pacient as p
     8join pregled as pregled on pregled.covek_pacient_id=p.covek_pacient_id
     9join covek as covek on covek.covek_id=p.covek_pacient_id
     10group by p.pacient_id,covek.covek_id;
     11
     12select pnp.ime, pnp.prezime ,pnp.pacient_id , pnp.pacientot_bil_na_pregled  as broj_pregledi
     13from pacient_najmnogu_pregledi as pnp
     14where pnp.pacientot_bil_na_pregled=
     15(select max(pacientot_bil_na_pregled) from pacient_najmnogu_pregledi);
     16}}}
    417
    518== Број на пациенти за секој оддел