    select '{desk_id}' as desk_id ,
        IFNULL(SUM(cards_data_base.Repetition),0) AS repetition,
        IFNULL(SUM(cards_data_base.News),0) AS news,
        IFNULL(SUM(cards_data_base.imports),0) AS imports,
        IFNULL(SUM(cards_data_base.Olds),0) AS olds,
        IFNULL(SUM(cards_data_base.toDay),0) AS today
FROM
cards_data_base 
WHERE
    cards_data_base.tree LIKE '%{desk_id}%'
    and repetition