How to convert minutes to hours using MYSQL? Personal I have this query that is returning the time in minutes for me. But I want this query to return in hours and minutes rather than in minutes. It's already tried using  FLOOR() function, but to no avail.

SQL

SELECT
   vencido.tickets_id,
   Tickets.name,
   Tickets.due_date,
   Tickets.solvedate,
   Cat.completename,
   TIMESTAMPDIFF(hour, Tickets.date, Tickets.solvedate) as Tempo 
FROM
   glpi_vencidos as vencido 
   INNER JOIN
      glpi_tickets as Tickets 
      ON (Tickets.id = vencido.tickets_id) 
   INNER JOIN
      glpi_itilcategories as Cat 
      ON (Tickets.itilcategories_id = Cat.id) 
WHERE
   Tickets.solvedate between STR_TO_DATE('01/06/2017', '%d/%m/%Y') and STR_TO_DATE('01/07/2017', '%d/%m/%Y') 
   and vencido.situacao = 1


My result in minutes
You need DIV and % operators.

DIV is the integer division and % is the modulo function, returning the reminder:

SELECT 12345 DIV 60 AS hrs, 12345 % 60 as min;


UPDATE

You have to change your query such way:

SELECT
   . . . . .
   TIMESTAMPDIFF(MINUTE, Tickets.date, Tickets.solvedate) DIV 60 AS TempoH,    
   TIMESTAMPDIFF(MINUTE, Tickets.date, Tickets.solvedate) % 60 AS TempoM
   . . . . .