2961.42 08 2019 01 office 109 project developed A chongqing company
2019 110 0 01 travel expenses 08 project developed A chongqing company
2019 01 post and communications 111 488.25 08 project developed A chongqing company
2019 116 0 01 transportation 08 project developed A chongqing company
2019 01 financial expenses amounted to 142 1575.74 08 project developed A chongqing company
2019 01 six charges together 98 7554.01 08 project developed A chongqing company
12835.06 08 2019 07 office 109 project developed A chongqing company
07 2019 cash 110 5876.47 08 project developed A chongqing company
2019 07 111 4350.65 08 post and communications project - A company of chongqing development
2019 116 0 07 transportation 08 project developed A chongqing company
2019-07 financial expenses combined 142-184003.45-08 project developed A chongqing company
2019-07 six charges together 98 232081.88 08 project developed A chongqing company
As the data on, for example, now want to take to finance_year finance_month maximum corresponding property_name, property_id, property_class, project, city, plate to property_value summation,
Such as the above data out of the end
Financial charges together this to pick up to 2019 - July - 184003.45 - the value,
SELECT
Finance_year,
City,
The project,
Plate,
Property_class,
Property_id,
The project,
Plate,
The sum (property_value) as value,
Max (CONCAT (finance_month finance_year, '-')) as y_m
The FROM
Imp. View_finance_reporter_budget
Where property_id in (' 98 ', '109', '110', '111', '116', '142')
And property_class='08'
And finance_month & lt;> '
And finance_year='2019'
Group by finance_year,
City,
The project,
Plate,
Property_class,
Property_id,
The project,
Plate
I wrote wrong, it will also sum up the January data,