MySQL Forums
Forum List  »  Newbie

SELECT Records using multiple ciritria
Posted by: Gary Ehrenfeld
Date: October 30, 2016 08:04AM

I have a diabetes database that the user's enter in their blood glucose readings that they take during the day.

Date-------Time---Value
10/15/16--08:35--120
10/15/16--14:00-- 85
10/17/16--22:00--146
10/21/16--04:45--256
10/21/16--12:00-- 95
and so on.

I need to average the values for the last 7, 14, and 30 days of readings from the last reading date.

How can I do one select statement where I get the average from all values from the last date entered back 7, 14,30 days

Options: ReplyQuote


Subject
Written By
Posted
SELECT Records using multiple ciritria
October 30, 2016 08:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.