UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> MySQL Return Max Value For Each Day And When It Occured    
 
   
ordnance1
post Dec 12 2014, 11:32 AM
Post#1



Posts: 480
Joined: 7-May 11



I have a weather database with over 1.5 million lines of data (1440 lines per day) and I need to create a view that gives me the max temperature for each day and the time at which the max temp was first reached (there could be multiple lines within the day where it is recorded). I have absolutely no idea how to get there.

CODE
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`localhost`
SQL SECURITY DEFINER
VIEW `view_maxtemp_record` AS
SELECT
    TIMESTAMP(`weatherhistorical`.`EventDate`,
        `weatherhistorical`.`EventTime`) AS `EventStamp`,
    MAX(`weatherhistorical`.`TempOut`) AS `TempOut`
FROM
    `weatherhistorical`
Go to the top of the page
 
orange999
post Dec 12 2014, 12:45 PM
Post#2



Posts: 1,713
Joined: 10-February 08
From: Ottawa, Ont, Canada; West Palm Beach, FL


Is there more to this post? Is this a MySQL BE with Access FE?
There has to be a better description of the issue/opportunity than SQL to create view.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    10th December 2017 - 11:14 PM