Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/09/2008, 13:42
jchuk
 
Fecha de Ingreso: julio-2006
Ubicación: Madrid
Mensajes: 943
Antigüedad: 17 años, 9 meses
Puntos: 56
Respuesta: Duda con group by

Hola, si lo entendí bien, no necesitas entonces la clausula group by, pues creo que no agrupas nada.

Código:
select direccion, tipo, precio, superficie, habitaciones from anuncio WHERE (Sysdate-Fecha) < 30 order by habitaciones asc, precio asc;
Si me equivoco y sí que agrupas la forma sería esta
Código:
select direccion, tipo, precio, superficie, habitaciones from anuncio WHERE Sysdate-Fecha < 30 group by habitaciones, direccion, tipo, precio, superficie order by habitaciones asc, precio asc;
A ver si es esto, un saludo