Tengo esta consulta
Código:
SELECT
h.idhabitacion,
h.descripcionh,
h.habit_x_hotel,
ho.descripcionho
FROM habitacion h
INNER JOIN hotel ho ON h.habit_x_hotel = ho.idhotel
where h.habit_x_hotel = '1'
GROUP BY h.idhabitacion
ORDER BY h.habitacionh DESC
pero no me ordena por la habitacion, me lo deja como estaba,
lo curioso es que si "hace caso" cuando quito el group by:
Código:
SELECT
h.idhabitacion,
h.descripcionh,
h.habit_x_hotel,
ho.descripcionho
FROM habitacion h
INNER JOIN hotel ho ON h.habit_x_hotel = ho.idhotel
where h.habit_x_hotel = '1'
ORDER BY h.habitacionh DESC
ahi si me funciona, ¿a que se debe?