Database design

Pop your questions regarding Home automation software here.....

Re: Database design

Postby nico_gh2 » Wed Feb 24, 2016 5:29 pm

At the moment all my data is in SQL Server and would like to stay with this solution. Just looking for a SQL query to group the data by day/week/month/year...


guess BETWEEN and DATEADD might help; BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL -7 DAY)
google is your friend for further solutions like; last week, last month, this month etc,...
User avatar
nico_gh2
Member
Member
 
Posts: 133
Joined: April 2011
Location: Betuwe, Netherlands

Database design

Postby Romac » Thu Feb 25, 2016 6:41 am

Thanks for your reply. I managed to get some graphs generated where I display daily use. Now working on getting the hourly use visible.


Sent from my iPhone using Tapatalk
HS3, Z-Wave Network, CommandFusion GUI
Romac
Starting Member
Starting Member
 
Posts: 47
Joined: May 2010
Location: Utrecht, Netherlands

Previous

Return to Questions & Discussions Forum

Who is online

Users browsing this forum: No registered users and 1 guest