CREATE 
VIEW `view_incontri_conteggi` AS
    SELECT 
        DATE_FORMAT(`tbl_incontri`.`incontroData`, '%d/%m') AS `Data`,
        COUNT(0) AS `Eventi`
    FROM
        (SELECT 
            `tbl_incontri`.`incontroData` AS `incontroData`,
            `tbl_incontri`.`incontroOra` AS `incontroOra`,
            `tbl_incontri`.`sede` AS `sede`
        FROM
            `tbl_incontri`
        GROUP BY `tbl_incontri`.`incontroData` , `tbl_incontri`.`incontroOra` , `tbl_incontri`.`sede`) `tbl_incontri`
    GROUP BY `tbl_incontri`.`incontroData` 
    UNION ALL SELECT 
        'Totale' AS `Totale`, COUNT(0) AS `count(*)`
    FROM
        (SELECT 
            `tbl_incontri`.`incontroData` AS `incontroData`,
            `tbl_incontri`.`incontroOra` AS `incontroOra`,
            `tbl_incontri`.`sede` AS `sede`
        FROM
            `tbl_incontri`
        GROUP BY `tbl_incontri`.`incontroData` , `tbl_incontri`.`incontroOra` , `tbl_incontri`.`sede`) `tbl_incontri`
    GROUP BY 'Totale'
