Changes between Version 9 and Version 10 of AdvancedReports
- Timestamp:
- 01/05/23 10:52:40 (23 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedReports
v9 v10 151 151 === Извештај за секое кино, кој филм има направено најмногу профит во последните 3 месеци === 152 152 {{{#!sql 153 select c.id_cinema,c.name, 154 max(sum_cena.sum1) as m 153 select c3.id_cinema,cpf3.id_film from cinemas c3 154 join cinema_plays_film cpf3 on cpf3.id_cinema=c3.id_cinema 155 join ( 156 select c.id_cinema as id1,max(sum_cena.sum1) as sumMaks 155 157 from cinemas c 156 158 join cinema_plays_film cpf on cpf.id_cinema=c.id_cinema … … 166 168 where t1.date_reserved between now()-interval'3 months' and now() 167 169 group by c2.id_cinema,f2.id_film 168 ) 169 as sum_cena on sum_cena.id=c.id_cinema 170 ) as sum_cena on sum_cena.id=c.id_cinema 170 171 group by c.id_cinema 171 order by c.id_cinema 172 ) as maks on maks.id1=c3.id_cinema 173 join ( 174 select distinct(c2.id_cinema) as id,f2.id_film as film,sum(t1.price) as sum2 from tickets t1 175 join projections p2 on p2.id_projection=t1.id_projection 176 join films f2 on f2.id_film = p2.id_film 177 join cinema_plays_film cpf2 on cpf2.id_film=f2.id_film 178 join cinemas c2 on c2.id_cinema=cpf2.id_cinema 179 where t1.date_reserved between now()-interval'3 months' and now() 180 group by c2.id_cinema,f2.id_film 181 182 ) as counts on counts.id=c3.id_cinema and counts.film=cpf3.id_film 183 where counts.sum2=maks.sumMaks 184 group by c3.id_cinema,cpf3.id_film 185 order by c3.id_cinema 186 172 187 }}} 173 188 === Извештај за секој клиент, за секое кино, колку карти има купено во секое кино, колку пари има потрошено во секое кино, и колку кодови за попуст имаат искористено во секое кино ===