任何帮助我
我想要下面的gridview sql数据摘要,如下所示
SQL DATA
SQL DATA:
Date Week GO_HQ LPSC_TGT LPSC_ACH
29-Apr-17 Week - 18 ADAYAR 4.25 3.42
30-Apr-17 Week - 18 ADAYAR 4.25 0
1-May-17 Week - 18 ADAYAR 4.25 0
2-May-17 Week - 18 ADAYAR 4.25 3.5
3-May-17 Week - 18 ADAYAR 4.25 3.1
4-May-17 Week - 18 ADAYAR 4.25 3.19
5-May-17 Week - 18 ADAYAR 4.25 0
6-May-17 Week - 19 ADAYAR 4.25 3.13
7-May-17 Week - 19 ADAYAR 4.25 2.2
8-May-17 Week - 19 ADAYAR 4.25 3.5
9-May-17 Week - 19 ADAYAR 4.25 4.2
10-May-17 Week - 19 ADAYAR 4.25 0
11-May-17 Week - 19 ADAYAR 4.25 0
12-May-17 Week - 19 ADAYAR 4.25 0
13-May-17 Week - 20 ADAYAR 4.25 0
14-May-17 Week - 20 ADAYAR 4.25 0
15-May-17 Week - 20 ADAYAR 4.25 0
16-May-17 Week - 20 ADAYAR 4.25 0
17-May-17 Week - 20 ADAYAR 4.25 0
18-May-17 Week - 20 ADAYAR 4.25 0
19-May-17 Week - 20 ADAYAR 4.25 0
20-May-17 Week - 21 ADAYAR 4.25 0
21-May-17 Week - 21 ADAYAR 4.25 0
22-May-17 Week - 21 ADAYAR 4.25 0
23-May-17 Week - 21 ADAYAR 4.25 0
24-May-17 Week - 21 ADAYAR 4.25 0
25-May-17 Week - 21 ADAYAR 4.25 0
26-May-17 Week - 21 ADAYAR 4.25 0
27-May-17 Week - 22 ADAYAR 4.25 0
28-May-17 Week - 22 ADAYAR 4.25 0
29-May-17 Week - 22 ADAYAR 4.25 0
30-May-17 Week - 22 ADAYAR 4.25 0
31-May-17 Week - 22 ADAYAR 4.25 0
1-Jun-17 Week - 22 ADAYAR 4.25 0
2-Jun-17 Week - 22 ADAYAR 4.25 0
我想要下面的摘要
答案 0 :(得分:0)
您可以通过以下方式进行简单的调整:
@extends('layout')
@section('title', 'Przychodnia')
@section('content')
<div class="container">
<div class="row">
<div class="box">
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">{{$doctorsDeadlines['lekarz']['imie']}} {{$doctorsDeadlines['lekarz']['nazwisko']}}
</h2>
<hr>
<hr class="visible-xs">
<h4 class="text-center">Terminarz</h4>
<br/>
<table class="table table-responsive table-striped table-bordered">
<tr>
@foreach($doctorsDeadlines['terminy'] as $date => $hours)
<th>{{$date}}</th>
@endforeach
</tr>
<tr>
@foreach($doctorsDeadlines['terminy'] as $date => $hours)
<td>
@foreach($hours as $hour )
<a href="#">{{$hour}}</a>
@endforeach
</td>
@endforeach
</tr>
</table>
</div>
</div>
</div>
</div>
@endsection
动态周:
select * from (
select Week, Go_hq, LPSC_ACH from yourtable ) a
pivot (sum(LPSC_ACH) for week in ([Week - 18]...)) p