[gl-como] Una mano con una query
    Riccardo Penco 
    riccardo.penco@gmail.com
       
    Ven  5 Lug 2013 13:43:02 CEST
    
    
  
questa (non provata e in effetti abbastanza bizzarra...)??
select t1,articolo, min(t1.update) as update
from table t1
  inner join (
    select articolo, prezzo as ultimoprezzo, max(update) as update
    from  table
    group by articolo, prezzo
    order by update desc
    limit 1
  ) t2 on t1.articolo = t2.articolo and t1.prezzo = t2.ultimoprezzo
group by t1,articolo
ciao
riki
>
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.linux.it/pipermail/gl-como/attachments/20130705/df376f7f/attachment.html>
    
    
       
       Maggiori informazioni sulla lista 
	       gl-como