subquery with date and max() -


i have problems query. shall return max temperature of day returns empty. have done wrong?

select * tempdat date( tdate ) = curdate( ) , temperature = ( select max( temperature ) tempdat ) ;

rather use:

select         convert(datetime, convert(varchar(12), tdate ))  dayoftemp        ,max(temperature)                                   maxtemp      tempdat       convert(datetime, convert(varchar(12), tdate )) = convert(datetime, convert(varchar(12, curdate( ) ))  group      convert(datetime, convert(varchar(12), tdate )) 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -