sql - Complicated mysql query across two tables -


table 1: invtypes columns typeid,groupid,typename,description
table 2: item_value columns typeid,volume,avg,max,min,stddev,percentile,updated_on

i need return of above columns latest updated_on (datetime) field deciding factor. return latest datetime each day of information table 1 , table 2 result.

this how rows corresponding recent updated_on each date in item_value table:

select   invtypes.*,   item_value.*   item_value inner join   (     select       max(updated_on) `updated_on`           item_value     group       date(updated_on)   ) latest on   latest.updated_on = item_value.updated_on inner join   invtypes on   invtypes.typeid = item_value.typeid order   item_value.updated_on 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -